nuxeo-development-framework 5.6.2 → 5.6.3
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/bundles/nuxeo-development-framework.umd.js +10 -5
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/core/services/roles/roles.service.js +10 -6
- package/fesm2015/nuxeo-development-framework.js +9 -5
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/core/services/roles/roles.service.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1308,8 +1308,7 @@
|
|
|
1308
1308
|
}(Nuxeo));
|
|
1309
1309
|
|
|
1310
1310
|
var RolesService = /** @class */ (function () {
|
|
1311
|
-
function RolesService(environment
|
|
1312
|
-
// , private globalAdmin : GlobalAdminService , private nuxeoService : NuxeoService
|
|
1311
|
+
function RolesService(environment // , private globalAdmin : GlobalAdminService , private nuxeoService : NuxeoService
|
|
1313
1312
|
) {
|
|
1314
1313
|
this.environment = environment;
|
|
1315
1314
|
}
|
|
@@ -1362,14 +1361,20 @@
|
|
|
1362
1361
|
}
|
|
1363
1362
|
return hasRole;
|
|
1364
1363
|
};
|
|
1365
|
-
RolesService.prototype.getUserRoleName = function (user, code) {
|
|
1364
|
+
RolesService.prototype.getUserRoleName = function (user, code, roleIncludes) {
|
|
1366
1365
|
var _this = this;
|
|
1366
|
+
if (roleIncludes === void 0) { roleIncludes = "dms_user_"; }
|
|
1367
|
+
var _a;
|
|
1367
1368
|
var found = null;
|
|
1368
|
-
var groups = user
|
|
1369
|
+
var groups = user
|
|
1370
|
+
? user.extendedGroups && ((_a = user.extendedGroups) === null || _a === void 0 ? void 0 : _a.length) > 0
|
|
1371
|
+
? user.extendedGroups
|
|
1372
|
+
: user.groups || []
|
|
1373
|
+
: [];
|
|
1369
1374
|
if (groups && groups.length) {
|
|
1370
1375
|
Object.keys(this.environment.RolesConstants).forEach(function (key) {
|
|
1371
1376
|
var roleWCode = _this.environment.RolesConstants[key].replace("{departmentTitle}", code);
|
|
1372
|
-
if ((code && roleWCode.includes(
|
|
1377
|
+
if ((code && roleWCode.includes(roleIncludes)) || !code)
|
|
1373
1378
|
groups.forEach(function (group) {
|
|
1374
1379
|
if (group.name || group === roleWCode) {
|
|
1375
1380
|
found = key;
|