rez_core 2.0.79 → 2.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -22,16 +22,13 @@ export class RoleService extends EntityServiceImpl {
|
|
|
22
22
|
|
|
23
23
|
async createEntity(
|
|
24
24
|
entityData: BaseEntity,
|
|
25
|
-
loggedInUser: UserData
|
|
26
|
-
manager?: EntityManager,
|
|
27
|
-
appcode?: string,
|
|
25
|
+
loggedInUser: UserData,
|
|
28
26
|
): Promise<BaseEntity> {
|
|
29
27
|
let role = entityData as Role;
|
|
30
28
|
|
|
31
|
-
if
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
29
|
+
// if level_type and level_id are not provided, use loggedInUser's values
|
|
30
|
+
role.level_type = entityData.level_type || loggedInUser.level_type;
|
|
31
|
+
role.level_id = entityData.level_id || loggedInUser.level_id;
|
|
35
32
|
|
|
36
33
|
if (
|
|
37
34
|
await this.roleRepository.isRoleNameWithLevelExists(role.name, {
|