chore: fix function name in comment (#24281)

pull/24299/head
cui fliter 2023-06-14 23:18:13 +08:00 committed by GitHub
parent 3dabfcdd08
commit 46ec649b9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -288,7 +288,7 @@ func (s *Service) DeleteAnnotations(ctx context.Context, orgID platform.ID, dele
return nil 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 { func (s *Service) DeleteAnnotation(ctx context.Context, id platform.ID) error {
s.store.Mu.Lock() s.store.Mu.Lock()
defer s.store.Mu.Unlock() defer s.store.Mu.Unlock()

View File

@ -47,7 +47,7 @@ func IsAllowed(ctx context.Context, p influxdb.Permission) error {
return IsAllowedAll(ctx, []influxdb.Permission{p}) 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. // Also see IsAllowed.
func IsAllowedAny(ctx context.Context, permissions []influxdb.Permission) error { func IsAllowedAny(ctx context.Context, permissions []influxdb.Permission) error {
a, err := icontext.GetAuthorizer(ctx) a, err := icontext.GetAuthorizer(ctx)

View File

@ -449,7 +449,7 @@ func MemberPermissions(orgID platform.ID) []Permission {
return ps 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 { func MemberBucketPermission(bucketID platform.ID) Permission {
return Permission{Action: ReadAction, Resource: Resource{Type: BucketsResourceType, ID: &bucketID}} return Permission{Action: ReadAction, Resource: Resource{Type: BucketsResourceType, ID: &bucketID}}
} }

View File

@ -21,7 +21,7 @@ func (s *tenantService) FindUserByID(ctx context.Context, id platform.ID) (*infl
return s.FindUserByIDFn(ctx, id) 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) { func (s *tenantService) FindUser(ctx context.Context, filter influxdb.UserFilter) (*influxdb.User, error) {
return s.FindUserFn(ctx, filter) return s.FindUserFn(ctx, filter)
} }