This commit is contained in:
venture
2026-11-15 09:04:18 +01:00
parent 03da7d9fff
commit 29a6ab40f0
16 changed files with 660 additions and 112 deletions
+11
View File
@@ -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
}