@steedos/standard-permission 2.5.3-beta.1 → 2.5.3-beta.2
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/triggers/permission_fields.trigger.js +3 -10
- package/main/default/triggers/permission_objects.trigger.js +0 -1
- package/main/default/triggers/permission_set.trigger.js +3 -11
- package/main/default/triggers/permission_tabs_metadata.trigger.js +3 -4
- package/main/default/triggers/restriction_rules.trigger.js +2 -10
- package/main/default/triggers/share_rules.trigger.js +2 -10
- package/main/default/triggers/share_rules_api_name.trigger.js +2 -2
- package/package.json +2 -2
|
@@ -1,19 +1,12 @@
|
|
|
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
|
-
*/
|
|
8
1
|
const objectql = require('@steedos/objectql');
|
|
9
2
|
const auth = require('@steedos/auth');
|
|
10
3
|
const clone = require('clone');
|
|
11
4
|
const _ = require('underscore');
|
|
12
5
|
const readonlyFields = ['created', 'created_by', 'modified', 'modified_by'];
|
|
13
|
-
|
|
6
|
+
|
|
14
7
|
async function getAll() {
|
|
15
8
|
const schema = objectql.getSteedosSchema();
|
|
16
|
-
const configs = await
|
|
9
|
+
const configs = await objectql.registerPermissionFields.getAll(schema.broker)
|
|
17
10
|
const dataList = _.pluck(configs, 'metadata');
|
|
18
11
|
|
|
19
12
|
_.each(dataList, function (item) {
|
|
@@ -26,7 +19,7 @@ async function getAll() {
|
|
|
26
19
|
|
|
27
20
|
async function get(apiName) {
|
|
28
21
|
const schema = objectql.getSteedosSchema();
|
|
29
|
-
const config = await
|
|
22
|
+
const config = await objectql.registerPermissionFields.get(schema.broker, apiName)
|
|
30
23
|
return config ? config.metadata : null;
|
|
31
24
|
}
|
|
32
25
|
|
|
@@ -1,24 +1,16 @@
|
|
|
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
|
-
*/
|
|
8
1
|
const _ = require('underscore');
|
|
9
2
|
const objectql = require('@steedos/objectql');
|
|
10
|
-
const register = require('@steedos/metadata-registrar');
|
|
11
3
|
const auth = require("@steedos/auth");
|
|
12
4
|
|
|
13
5
|
|
|
14
6
|
const getSourcePermissionSets = async function(type){
|
|
15
7
|
switch (type) {
|
|
16
8
|
case 'permission_set':
|
|
17
|
-
return await
|
|
9
|
+
return await objectql.getSourcePermissionsets();
|
|
18
10
|
case 'profile':
|
|
19
|
-
return await
|
|
11
|
+
return await objectql.getSourceProfiles();
|
|
20
12
|
default:
|
|
21
|
-
return (await
|
|
13
|
+
return (await objectql.getSourceProfiles()).concat((await objectql.getSourcePermissionsets()));
|
|
22
14
|
}
|
|
23
15
|
|
|
24
16
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2022-10-26 14:14:51
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: sunhaolin@hotoa.com
|
|
5
|
+
* @LastEditTime: 2022-10-27 17:42:29
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
const objectql = require('@steedos/objectql');
|
|
9
|
-
const register = require('@steedos/metadata-registrar');
|
|
10
9
|
const auth = require('@steedos/auth');
|
|
11
10
|
const _ = require('underscore');
|
|
12
11
|
async function getAll() {
|
|
13
12
|
const schema = objectql.getSteedosSchema();
|
|
14
|
-
const configs = await
|
|
13
|
+
const configs = await objectql.registerTab.getAll(schema.broker)
|
|
15
14
|
const dataList = _.pluck(configs, 'metadata');
|
|
16
15
|
let permissionTabs = [];
|
|
17
16
|
for (const item of dataList) {
|
|
@@ -1,18 +1,10 @@
|
|
|
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
|
-
*/
|
|
8
1
|
const objectql = require('@steedos/objectql');
|
|
9
|
-
const register = require('@steedos/metadata-registrar');
|
|
10
2
|
const auth = require('@steedos/auth');
|
|
11
3
|
const _ = require('underscore');
|
|
12
4
|
const clone = require('clone');
|
|
13
5
|
async function getAll() {
|
|
14
6
|
const schema = objectql.getSteedosSchema();
|
|
15
|
-
const configs = await
|
|
7
|
+
const configs = await objectql.registerRestrictionRules.getAll(schema.broker)
|
|
16
8
|
const dataList = _.pluck(configs, 'metadata');
|
|
17
9
|
|
|
18
10
|
_.each(dataList, function (item) {
|
|
@@ -25,7 +17,7 @@ async function getAll() {
|
|
|
25
17
|
|
|
26
18
|
async function get(apiName) {
|
|
27
19
|
const schema = objectql.getSteedosSchema();
|
|
28
|
-
const config = await
|
|
20
|
+
const config = await objectql.registerRestrictionRules.get(schema.broker, apiName)
|
|
29
21
|
return config ? Object.assign(config.metadata, { _id: config.metadata._id || `${config.metadata.object_name}.${config.metadata.name}` }) : null;
|
|
30
22
|
}
|
|
31
23
|
|
|
@@ -1,18 +1,10 @@
|
|
|
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
|
-
*/
|
|
8
1
|
const objectql = require('@steedos/objectql');
|
|
9
2
|
const auth = require('@steedos/auth');
|
|
10
|
-
const register = require('@steedos/metadata-registrar');
|
|
11
3
|
const _ = require('underscore');
|
|
12
4
|
const clone = require('clone');
|
|
13
5
|
async function getAll() {
|
|
14
6
|
const schema = objectql.getSteedosSchema();
|
|
15
|
-
const configs = await
|
|
7
|
+
const configs = await objectql.registerShareRules.getAll(schema.broker)
|
|
16
8
|
const dataList = _.pluck(configs, 'metadata');
|
|
17
9
|
|
|
18
10
|
_.each(dataList, function (item) {
|
|
@@ -25,7 +17,7 @@ async function getAll() {
|
|
|
25
17
|
|
|
26
18
|
async function get(apiName) {
|
|
27
19
|
const schema = objectql.getSteedosSchema();
|
|
28
|
-
const config = await
|
|
20
|
+
const config = await objectql.registerShareRules.get(schema.broker, apiName)
|
|
29
21
|
return config ? Object.assign(config.metadata, { _id: config.metadata._id || `${config.metadata.object_name}.${config.metadata.name}` }) : null;
|
|
30
22
|
}
|
|
31
23
|
|
|
@@ -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: sunhaolin@hotoa.com
|
|
5
|
+
* @LastEditTime: 2022-07-30 13:22:15
|
|
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.2",
|
|
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": "321fe88aba6ddc3380a0d71eaa2e9a18186d49f8"
|
|
16
16
|
}
|