@steedos/standard-object-database 2.5.0-beta.23 → 2.5.0-beta.25

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.
@@ -19,6 +19,9 @@ Meteor.startup(function () {
19
19
  }
20
20
  }).observe({
21
21
  added: function (newDocument) {
22
+ if (newDocument.copy_from) { // 通过复制简档创建的字段权限,使用批量注册
23
+ return;
24
+ }
22
25
  if (inited) {
23
26
  return _change(newDocument);
24
27
  }
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-08-05 14:17:44
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2023-02-22 10:23:14
4
+ * @LastEditors: sunhaolin@hotoa.com
5
+ * @LastEditTime: 2023-05-12 09:33:27
6
6
  * @Description:
7
7
  */
8
8
  const objectql = require("@steedos/objectql");
@@ -13,7 +13,7 @@ Meteor.startup(function () {
13
13
  // 重置字段权限延迟10秒,防止对象服务未上线
14
14
  setTimeout(()=>{
15
15
  try {
16
- console.log("====resetAllPermissionSetFieldPermissions====")
16
+ // console.log("====resetAllPermissionSetFieldPermissions====")
17
17
  objectql.getSteedosSchema().broker.call(`permission_fields.resetAllPermissionSetFieldPermissions`, {
18
18
  objectName: document.object
19
19
  }, {
@@ -1,8 +1,8 @@
1
1
  /*
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-08-05 14:17:44
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2023-02-22 10:32:01
4
+ * @LastEditors: sunhaolin@hotoa.com
5
+ * @LastEditTime: 2023-05-13 17:09:31
6
6
  * @Description:
7
7
  */
8
8
  const objectql = require("@steedos/objectql");
@@ -38,6 +38,9 @@ Meteor.startup(function () {
38
38
  }
39
39
  }).observe({
40
40
  added: function (newDocument) {
41
+ if (newDocument.copy_from) { // 通过复制简档创建的对象权限,不需要重置字段权限
42
+ return;
43
+ }
41
44
  if (inited) {
42
45
  return _change(newDocument);
43
46
  }
@@ -12,9 +12,7 @@ fields:
12
12
  required: true
13
13
  name:
14
14
  data_type: text
15
- formula: listenTo.name+"_"+_name
16
- formula_blank_value: blanks
17
- type: formula
15
+ type: text
18
16
  visible_on: "{{false}}"
19
17
  listenTo:
20
18
  label: Object
@@ -2,7 +2,7 @@
2
2
  * @Author: sunhaolin@hotoa.com
3
3
  * @Date: 2021-06-03 15:11:52
4
4
  * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2023-04-27 17:41:52
5
+ * @LastEditTime: 2023-05-15 09:26:19
6
6
  * @Description:
7
7
  */
8
8
  const Cache = require('@steedos/cachers');
@@ -78,7 +78,8 @@ module.exports = {
78
78
  const count = await objectql.getObject('object_triggers').count({filters: [['_name', '=', doc._name], ['listenTo','=', doc.listenTo]]})
79
79
  if(count > 0){
80
80
  throw new Error('触发器名称不能重复')
81
- }
81
+ }
82
+ doc.name = `${doc.listenTo}_${doc._name}`
82
83
  },
83
84
  beforeUpdate: async function () {
84
85
  const doc = this.doc;
@@ -88,6 +89,7 @@ module.exports = {
88
89
  const count = await objectql.getObject('object_triggers').count({filters: [['_name', '=', doc._name], ['listenTo','=', doc.listenTo], ['_id', '!=', this.id]]})
89
90
  if(count > 0){
90
91
  throw new Error('触发器名称不能重复')
91
- }
92
+ }
93
+ doc.name = `${doc.listenTo}_${doc._name}`
92
94
  }
93
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-object-database",
3
- "version": "2.5.0-beta.23",
3
+ "version": "2.5.0-beta.25",
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": "49ef7bdf5fca9be70922ebb2275ed0c20bca4ec6"
18
+ "gitHead": "07943cbedb6caa88cc6a6d365c9fa3603660413d"
19
19
  }