remove unneeded JS-API dep

move auth in the right place
This commit is contained in:
eromano
2023-03-16 13:00:32 +01:00
parent bb3000346f
commit 3b9d1ace1b
2 changed files with 1 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ export class ContentService {
*/
hasPermissions(node: Node, permission: PermissionsEnum | string, userId?: string): boolean {
let hasPermissions = false;
userId = userId ?? this.authService.getEcmUsername();
userId = userId ?? this.apiService.getInstance().getEcmUsername();
const permissions = [...(node.permissions?.locallySet || []), ...(node.permissions?.inherited || [])].filter(
(currentPermission) => currentPermission.authorityId === userId

View File

@@ -62,8 +62,6 @@ export abstract class BaseAuthenticationService {
abstract logout(): Observable<any>;
abstract isEcmLoggedIn(): boolean;
abstract isBpmLoggedIn(): boolean;
abstract getEcmUsername(): string;
abstract getBpmUsername(): string;
abstract reset(): void;
abstract once(event: string): Observable<any>;