[AAE-12501] Get username with authentication service

This commit is contained in:
Amedeo Lepore
2023-08-31 10:26:30 +02:00
committed by eromano
parent f94df8a5fd
commit 79053238af
@@ -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