@steedos/standard-object-database 2.4.0-beta.29 → 2.4.0-beta.30
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.
|
@@ -1,24 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-08-05 14:17:44
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-02-22 10:23:14
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
1
8
|
const objectql = require("@steedos/objectql");
|
|
2
9
|
const objectName = "object_fields";
|
|
3
10
|
Meteor.startup(function () {
|
|
4
11
|
var _change, _remove, inited = false;
|
|
5
12
|
_change = function (document) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
// 重置字段权限延迟10秒,防止对象服务未上线
|
|
14
|
+
setTimeout(()=>{
|
|
15
|
+
try {
|
|
16
|
+
console.log("====resetAllPermissionSetFieldPermissions====")
|
|
17
|
+
objectql.getSteedosSchema().broker.call(`permission_fields.resetAllPermissionSetFieldPermissions`, {
|
|
18
|
+
objectName: document.object
|
|
19
|
+
}, {
|
|
20
|
+
meta: {
|
|
21
|
+
user: {
|
|
22
|
+
userId: document.owner,
|
|
23
|
+
spaceId: document.space,
|
|
24
|
+
company_id: document.company_id,
|
|
25
|
+
company_ids: document.company_ids,
|
|
26
|
+
}
|
|
16
27
|
}
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
28
|
+
});
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error(`resetAllPermissionSetFieldPermissions`, error)
|
|
31
|
+
}
|
|
32
|
+
}, 1000 * 10)
|
|
22
33
|
};
|
|
23
34
|
Creator.getCollection(objectName).find({}, {
|
|
24
35
|
fields: {
|
|
@@ -1,24 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-08-05 14:17:44
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-02-22 10:32:01
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
1
8
|
const objectql = require("@steedos/objectql");
|
|
2
9
|
const objectName = "permission_objects";
|
|
3
10
|
Meteor.startup(function () {
|
|
4
11
|
var _change, _remove, inited = false;
|
|
5
12
|
_change = function (document) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
setTimeout(()=>{
|
|
14
|
+
try {
|
|
15
|
+
objectql.getSteedosSchema().broker.call(`permission_fields.resetFieldPermissions`, {
|
|
16
|
+
permissionObjectId: document._id
|
|
17
|
+
}, {
|
|
18
|
+
meta: {
|
|
19
|
+
user: {
|
|
20
|
+
userId: document.owner,
|
|
21
|
+
spaceId: document.space,
|
|
22
|
+
company_id: document.company_id,
|
|
23
|
+
company_ids: document.company_ids,
|
|
24
|
+
}
|
|
16
25
|
}
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
26
|
+
});
|
|
27
|
+
} catch (error) {
|
|
28
|
+
console.error(`resetFieldPermissions`, error)
|
|
29
|
+
}
|
|
30
|
+
}, 1000 * 10)
|
|
22
31
|
};
|
|
23
32
|
Creator.getCollection(objectName).find({}, {
|
|
24
33
|
fields: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-object-database",
|
|
3
|
-
"version": "2.4.0-beta.
|
|
3
|
+
"version": "2.4.0-beta.30",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
},
|
|
16
16
|
"repository": {},
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "22c0cf80236640dac2c2a85b7a209355ef00e57c"
|
|
19
19
|
}
|