Refactor auth middleware

Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
bcmmbaga
2024-11-01 14:02:09 +03:00
parent e73b5da42b
commit fed48de83f
9 changed files with 102 additions and 104 deletions

View File

@@ -146,6 +146,10 @@ func NewPATNotFoundError() error {
return Errorf(NotFound, "PAT not found")
}
func NewGetPATFromStoreError() error {
return Errorf(Internal, "issue getting pat from store")
}
func NewUnauthorizedToViewPATsError() error {
return Errorf(PermissionDenied, "only users with admin power can view PATs")
}