@digione/node-custom-api 0.1.9-beta12 → 0.1.9-beta13
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 +1 -1
- package/utils/user.js +6 -3
package/package.json
CHANGED
package/utils/user.js
CHANGED
|
@@ -317,9 +317,12 @@ const getGroupSetting = (ref, id, { attributes = ['id', 'shared', 'setting'] } =
|
|
|
317
317
|
exports.getGroupSetting = getGroupSetting;
|
|
318
318
|
const getGroupPermission = (ref, id, module, { permission = {}, group_shared = undefined, organ_id = 0, attributes = ['id', 'shared', 'setting'] } = {}) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
319
319
|
if (typeof group_shared == "undefined") {
|
|
320
|
-
let
|
|
321
|
-
if (
|
|
322
|
-
|
|
320
|
+
let group = yield (0, exports.getGroupSetting)(ref, id, { attributes });
|
|
321
|
+
if (group) {
|
|
322
|
+
permission['group_setting'] = group['setting'] || {};
|
|
323
|
+
permission['admin'] = group['shared'];
|
|
324
|
+
group_shared = group['shared'];
|
|
325
|
+
}
|
|
323
326
|
}
|
|
324
327
|
if (typeof group_shared != "undefined" && group_shared == 0) {
|
|
325
328
|
let query = yield group_permission_1.UserGroupPermissionModel.schema(ref, "_").findOne({
|