remove unneeded JS-API dep

move auth in the right place
This commit is contained in:
eromano
2023-03-31 12:12:02 +02:00
committed by Amedeo Lepore
parent 82ae9d53d1
commit aa69ac4d27
5 changed files with 9 additions and 68 deletions
@@ -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);