mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
remove unneeded JS-API dep
move auth in the right place
This commit is contained in:
@@ -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
|
||||
|
@@ -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>;
|
||||
|
||||
|
Reference in New Issue
Block a user