mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[AAE-12501] Get username with authentication service
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.apiService.getInstance().getEcmUsername();
|
||||
userId = userId ?? this.authService.getEcmUsername();
|
||||
|
||||
const permissions = [...(node.permissions?.locallySet || []), ...(node.permissions?.inherited || [])].filter(
|
||||
(currentPermission) => currentPermission.authorityId === userId
|
||||
|
||||
Reference in New Issue
Block a user