backend-app-api: always return true from auth.isPrincipal for unknown checks

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2024-02-16 12:17:06 +01:00
parent 25609ed662
commit 4c72edd4c0
2 changed files with 9 additions and 0 deletions
@@ -147,6 +147,10 @@ class DefaultAuthService implements AuthService {
| BackstageUserPrincipal
| BackstageServicePrincipal;
if (type === 'unknown') {
return true;
}
if (principal.type !== type) {
return false;
}
@@ -86,6 +86,11 @@ export class MockAuthService implements AuthService {
| BackstageUserPrincipal
| BackstageServicePrincipal
| BackstageNonePrincipal;
if (type === 'unknown') {
return true;
}
if (principal.type !== type) {
return false;
}