@steedos/standard-permission 2.5.3-beta.2 → 2.5.3-beta.5
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/main/default/objectTranslations/permission_set.en/permission_set.en.objectTranslation.yml +0 -4
- package/main/default/objectTranslations/permission_set.zh-CN/permission_set.zh-CN.objectTranslation.yml +0 -4
- package/main/default/objects/permission_set/permission_set.object.yml +0 -9
- package/main/default/triggers/permission_fields.trigger.js +10 -3
- package/main/default/triggers/permission_objects.trigger.js +1 -0
- package/main/default/triggers/permission_set.trigger.js +11 -3
- package/main/default/triggers/permission_tabs_metadata.trigger.js +4 -3
- package/main/default/triggers/restriction_rules.trigger.js +10 -2
- package/main/default/triggers/share_rules.trigger.js +10 -2
- package/main/default/triggers/share_rules_api_name.trigger.js +2 -2
- package/package.json +2 -2
|
@@ -26,15 +26,6 @@ fields:
|
|
|
26
26
|
firstOption: false
|
|
27
27
|
options: Profile:profile,Permission set:permission_set
|
|
28
28
|
defaultValue: permission_set
|
|
29
|
-
license:
|
|
30
|
-
label: License
|
|
31
|
-
type: lookup
|
|
32
|
-
optionsFunction: !!js/function
|
|
33
|
-
function(){
|
|
34
|
-
return Steedos.getLicenseOptions();
|
|
35
|
-
}
|
|
36
|
-
showIcon: false
|
|
37
|
-
# required: "{{ 'profile' === formData.type }}"
|
|
38
29
|
assigned_apps:
|
|
39
30
|
label: Assigned Apps
|
|
40
31
|
type: lookup
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-08-05 14:17:44
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-05-30 17:08:43
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
1
8
|
const objectql = require('@steedos/objectql');
|
|
2
9
|
const auth = require('@steedos/auth');
|
|
3
10
|
const clone = require('clone');
|
|
4
11
|
const _ = require('underscore');
|
|
5
12
|
const readonlyFields = ['created', 'created_by', 'modified', 'modified_by'];
|
|
6
|
-
|
|
13
|
+
const register = require('@steedos/metadata-registrar');
|
|
7
14
|
async function getAll() {
|
|
8
15
|
const schema = objectql.getSteedosSchema();
|
|
9
|
-
const configs = await
|
|
16
|
+
const configs = await register.registerPermissionFields.getAll(schema.broker)
|
|
10
17
|
const dataList = _.pluck(configs, 'metadata');
|
|
11
18
|
|
|
12
19
|
_.each(dataList, function (item) {
|
|
@@ -19,7 +26,7 @@ async function getAll() {
|
|
|
19
26
|
|
|
20
27
|
async function get(apiName) {
|
|
21
28
|
const schema = objectql.getSteedosSchema();
|
|
22
|
-
const config = await
|
|
29
|
+
const config = await register.registerPermissionFields.get(schema.broker, apiName)
|
|
23
30
|
return config ? config.metadata : null;
|
|
24
31
|
}
|
|
25
32
|
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-08-05 14:17:44
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-05-30 15:10:02
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
1
8
|
const _ = require('underscore');
|
|
2
9
|
const objectql = require('@steedos/objectql');
|
|
10
|
+
const register = require('@steedos/metadata-registrar');
|
|
3
11
|
const auth = require("@steedos/auth");
|
|
4
12
|
|
|
5
13
|
|
|
6
14
|
const getSourcePermissionSets = async function(type){
|
|
7
15
|
switch (type) {
|
|
8
16
|
case 'permission_set':
|
|
9
|
-
return await
|
|
17
|
+
return await register.getSourcePermissionsets();
|
|
10
18
|
case 'profile':
|
|
11
|
-
return await
|
|
19
|
+
return await register.getSourceProfiles();
|
|
12
20
|
default:
|
|
13
|
-
return (await
|
|
21
|
+
return (await register.getSourceProfiles()).concat((await register.getSourcePermissionsets()));
|
|
14
22
|
}
|
|
15
23
|
|
|
16
24
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2022-10-26 14:14:51
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-05-30 15:09:54
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
const objectql = require('@steedos/objectql');
|
|
9
|
+
const register = require('@steedos/metadata-registrar');
|
|
9
10
|
const auth = require('@steedos/auth');
|
|
10
11
|
const _ = require('underscore');
|
|
11
12
|
async function getAll() {
|
|
12
13
|
const schema = objectql.getSteedosSchema();
|
|
13
|
-
const configs = await
|
|
14
|
+
const configs = await register.registerTab.getAll(schema.broker)
|
|
14
15
|
const dataList = _.pluck(configs, 'metadata');
|
|
15
16
|
let permissionTabs = [];
|
|
16
17
|
for (const item of dataList) {
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-08-05 14:17:44
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-05-30 17:06:59
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
1
8
|
const objectql = require('@steedos/objectql');
|
|
9
|
+
const register = require('@steedos/metadata-registrar');
|
|
2
10
|
const auth = require('@steedos/auth');
|
|
3
11
|
const _ = require('underscore');
|
|
4
12
|
const clone = require('clone');
|
|
5
13
|
async function getAll() {
|
|
6
14
|
const schema = objectql.getSteedosSchema();
|
|
7
|
-
const configs = await
|
|
15
|
+
const configs = await register.registerRestrictionRules.getAll(schema.broker)
|
|
8
16
|
const dataList = _.pluck(configs, 'metadata');
|
|
9
17
|
|
|
10
18
|
_.each(dataList, function (item) {
|
|
@@ -17,7 +25,7 @@ async function getAll() {
|
|
|
17
25
|
|
|
18
26
|
async function get(apiName) {
|
|
19
27
|
const schema = objectql.getSteedosSchema();
|
|
20
|
-
const config = await
|
|
28
|
+
const config = await register.registerRestrictionRules.get(schema.broker, apiName)
|
|
21
29
|
return config ? Object.assign(config.metadata, { _id: config.metadata._id || `${config.metadata.object_name}.${config.metadata.name}` }) : null;
|
|
22
30
|
}
|
|
23
31
|
|
|
@@ -1,10 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-08-05 14:17:44
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-05-30 17:07:49
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
1
8
|
const objectql = require('@steedos/objectql');
|
|
2
9
|
const auth = require('@steedos/auth');
|
|
10
|
+
const register = require('@steedos/metadata-registrar');
|
|
3
11
|
const _ = require('underscore');
|
|
4
12
|
const clone = require('clone');
|
|
5
13
|
async function getAll() {
|
|
6
14
|
const schema = objectql.getSteedosSchema();
|
|
7
|
-
const configs = await
|
|
15
|
+
const configs = await register.registerShareRules.getAll(schema.broker)
|
|
8
16
|
const dataList = _.pluck(configs, 'metadata');
|
|
9
17
|
|
|
10
18
|
_.each(dataList, function (item) {
|
|
@@ -17,7 +25,7 @@ async function getAll() {
|
|
|
17
25
|
|
|
18
26
|
async function get(apiName) {
|
|
19
27
|
const schema = objectql.getSteedosSchema();
|
|
20
|
-
const config = await
|
|
28
|
+
const config = await register.registerShareRules.get(schema.broker, apiName)
|
|
21
29
|
return config ? Object.assign(config.metadata, { _id: config.metadata._id || `${config.metadata.object_name}.${config.metadata.name}` }) : null;
|
|
22
30
|
}
|
|
23
31
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2021-12-27 10:49:33
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-05-30 17:07:59
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
const util = require('@steedos/standard-objects').util;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-permission",
|
|
3
|
-
"version": "2.5.3-beta.
|
|
3
|
+
"version": "2.5.3-beta.5",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"description": "steedos package",
|
|
13
13
|
"repository": {},
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "c6817f6816ad44017068d161cf69605e18ff5270"
|
|
16
16
|
}
|