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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user