Skip to content

Commit

Permalink
remove DONE comments
Browse files Browse the repository at this point in the history
  • Loading branch information
aldevv committed Oct 25, 2024
1 parent ae9e2ad commit dc4ddf1
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ var ErrNoKeyProvided = errors.New("no key provided")
const initTimeout = time.Duration(10) * time.Second

func New(ctx context.Context, proxyAddress, keyFile, key string) (*TeleportClient, error) {
// DONE: Dial opts are deprecated. We also need to add a default port in proxyAddress if one doesn't exist (to avoid an info message)
if !hasPort(proxyAddress) {
proxyAddress += ":443"
}
Expand Down
1 change: 0 additions & 1 deletion pkg/connector/nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func getNodeResource(node *Node) (*v2.Resource, error) {
// Nodes include a NodeTrait because they are the 'shape' of a standard node.
func (n *nodeBuilder) List(ctx context.Context, parentId *v2.ResourceId, token *pagination.Token) ([]*v2.Resource, string, annotations.Annotations, error) {
var rv []*v2.Resource
// DONE: client.GetNodes calls GetResources, which is paginated. we need to handle pagination here
nodes, err := n.client.GetNodes(ctx, token)
if err != nil {
return nil, "", nil, err
Expand Down
8 changes: 0 additions & 8 deletions pkg/connector/roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,6 @@ func (r *roleBuilder) Entitlements(ctx context.Context, resource *v2.Resource, t

func (r *roleBuilder) Grants(ctx context.Context, resource *v2.Resource, token *pagination.Token) ([]*v2.Grant, string, annotations.Annotations, error) {
var rv []*v2.Grant
// DONE: look into whether we can use client.ListUsers() as it allows filtering, possibly by role
// If we can't, we should try caching the list of all users so we're not re-fetching it on every call to Grants()

// NOTE: no way to filter by role
// users, err := r.client.ListUsers(ctx, usersv1.ListUsersRequest{
// Filter: &usersv1.UserFilter{},
// })

users, err := r.GetUsers(ctx)
if err != nil {
return nil, "", nil, err
Expand Down
2 changes: 0 additions & 2 deletions pkg/connector/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func userResource(pId *v2.ResourceId, user types.User) (*v2.Resource, error) {
status v2.UserTrait_Status_Status
)

// DONE: IsBot is false for @teleport-access-approval-bot
if user.IsBot() {
accountType = v2.UserTrait_ACCOUNT_TYPE_SERVICE
}
Expand Down Expand Up @@ -70,7 +69,6 @@ func userResource(pId *v2.ResourceId, user types.User) (*v2.Resource, error) {
user.GetName(),
userResourceType,
user.GetName(),
// DONE: This is not always an email address, at least not for @teleport-access-approval-bot or bots
opts,
resource.WithParentResourceID(pId),
)
Expand Down

0 comments on commit dc4ddf1

Please sign in to comment.