diff --git a/annotations/service.go b/annotations/service.go index 7e607b8f2e..aef9c68306 100644 --- a/annotations/service.go +++ b/annotations/service.go @@ -288,7 +288,7 @@ func (s *Service) DeleteAnnotations(ctx context.Context, orgID platform.ID, dele return nil } -// DeleteAnnoation deletes a single annotation by ID +// DeleteAnnotation deletes a single annotation by ID func (s *Service) DeleteAnnotation(ctx context.Context, id platform.ID) error { s.store.Mu.Lock() defer s.store.Mu.Unlock() diff --git a/authorizer/authorize.go b/authorizer/authorize.go index daba7486dc..215f76ad4d 100644 --- a/authorizer/authorize.go +++ b/authorizer/authorize.go @@ -47,7 +47,7 @@ func IsAllowed(ctx context.Context, p influxdb.Permission) error { return IsAllowedAll(ctx, []influxdb.Permission{p}) } -// IsAllowedAll checks to see if an action is authorized by ALL permissions. +// IsAllowedAny checks to see if an action is authorized by ANY permissions. // Also see IsAllowed. func IsAllowedAny(ctx context.Context, permissions []influxdb.Permission) error { a, err := icontext.GetAuthorizer(ctx) diff --git a/authz.go b/authz.go index a4607cb307..53bd298cfb 100644 --- a/authz.go +++ b/authz.go @@ -449,7 +449,7 @@ func MemberPermissions(orgID platform.ID) []Permission { return ps } -// MemberPermissions are the default permissions for those who can see a resource. +// MemberBucketPermission are the default permissions for those who can see a resource. func MemberBucketPermission(bucketID platform.ID) Permission { return Permission{Action: ReadAction, Resource: Resource{Type: BucketsResourceType, ID: &bucketID}} } diff --git a/v1/authorization/mock_tenant.go b/v1/authorization/mock_tenant.go index b8dd501091..5a3cde5445 100644 --- a/v1/authorization/mock_tenant.go +++ b/v1/authorization/mock_tenant.go @@ -21,7 +21,7 @@ func (s *tenantService) FindUserByID(ctx context.Context, id platform.ID) (*infl return s.FindUserByIDFn(ctx, id) } -// FindUsers returns a list of Users that match filter and the total count of matching Users. +// FindUser returns a single User that match filter. func (s *tenantService) FindUser(ctx context.Context, filter influxdb.UserFilter) (*influxdb.User, error) { return s.FindUserFn(ctx, filter) }