populate Admin Rights by Ownership to permission object
This commit is contained in:
parent
d7cb8eb475
commit
74ff6838cc
3 changed files with 66 additions and 13 deletions
|
@ -58,7 +58,10 @@ export abstract class JWTHelper {
|
|||
let rolePermissions =
|
||||
userRoles.length != 0 ? await RolePermissionService.getByRoles(userRoles.map((e) => e.id)) : [];
|
||||
let rolePermissionStrings = rolePermissions.map((e) => e.permission);
|
||||
let permissionObject = PermissionHelper.convertToObject([...userPermissionStrings, ...rolePermissionStrings]);
|
||||
let permissionObject = PermissionHelper.convertToObject(
|
||||
[...userPermissionStrings, ...rolePermissionStrings],
|
||||
isOwner
|
||||
);
|
||||
|
||||
let jwtData: JWTToken = {
|
||||
userId: id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue