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