acl
This commit is contained in:
@@ -70,3 +70,14 @@ func (s *Service) loadSubject(ctx context.Context, subjectID ident.UUID) (*ident
|
||||
|
||||
return subject, nil
|
||||
}
|
||||
|
||||
func (s *Service) IsActive(ctx context.Context, principalID ident.UUID) (bool, error) {
|
||||
if _, err := s.loadSubject(ctx, principalID); err != nil {
|
||||
if errors.Is(err, ErrSubjectNotFound) {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
}
|
||||
|
||||
return true, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user