@steedos/standard-permission 2.7.0-beta.9 → 2.7.0

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.
@@ -76,10 +76,10 @@ fields:
76
76
  }
77
77
  readable:
78
78
  type: boolean
79
- label: 允许查看
79
+ label: 可见
80
80
  sort_no: 150
81
81
  editable:
82
- label: 允许编辑
82
+ label: 可编辑
83
83
  type: boolean
84
84
  sort_no: 160
85
85
  is_system:
@@ -131,25 +131,6 @@ list_views:
131
131
  - editable
132
132
  - is_system
133
133
  filter_scope: space
134
- form:
135
- onValuesChange: !!js/function |
136
- function(props){
137
- const { changedValues, values, form } = props;
138
- const readonlyFields = ['created', 'created_by', 'modified', 'modified_by'];
139
- if(changedValues.editable){
140
- if(window._.include(readonlyFields, values.field)){
141
- return setTimeout(function(){
142
- form.setFieldsValue({editable: false})
143
- }, 50)
144
- }
145
- form.setFieldsValue({readable: true});
146
- }
147
-
148
- if(_.has(changedValues, 'readable') && !changedValues.readable && values.editable){
149
- form.setFieldsValue({editable: false})
150
- }
151
- }
152
-
153
134
  permission_set:
154
135
  user:
155
136
  allowCreate: false
@@ -339,15 +339,4 @@ permission_set:
339
339
  allowEdit: true
340
340
  allowRead: true
341
341
  modifyAllRecords: true
342
- viewAllRecords: true
343
- form:
344
- beforeView: !!js/function |
345
- function(){
346
- /*附件权限需要兼容之前没有附件权限配置功能时的设置,取好默认值显示即可*/
347
- Creator.processPermissions(this.doc);
348
- }
349
- beforeEdit: !!js/function |
350
- function(){
351
- /*附件权限需要兼容之前没有附件权限配置功能时的设置,取好默认值显示即可*/
352
- Creator.processPermissions(this.doc);
353
- }
342
+ viewAllRecords: true
@@ -238,37 +238,4 @@ permission_set:
238
238
  allowEdit: false
239
239
  allowRead: false
240
240
  modifyAllRecords: false
241
- viewAllRecords: false
242
- form:
243
- initialValues: !!js/function |
244
- function(){
245
- var listView = Creator.getListView();
246
- if(listView && listView.name === 'profile'){
247
- return {type: 'profile'}
248
- }
249
- return {}
250
- }
251
- beforeEdit: !!js/function |
252
- function(){
253
- Steedos.PermissionSetManager.changeSchema(this.doc, this.schema);
254
- }
255
- afterEdit: !!js/function |
256
- function(){
257
- Steedos.PermissionSetManager.changeSchema(this.doc, this.schema);
258
- }
259
- beforeView: !!js/function |
260
- function(){
261
- Steedos.PermissionSetManager.changeSchema(this.doc, this.schema);
262
- }
263
- beforeInsert: !!js/function |
264
- function(){
265
- if(this.doc && _.isString(this.doc.users)){
266
- this.doc.users = this.doc.users.split(',');
267
- }
268
- }
269
- beforeUpdate: !!js/function |
270
- function(){
271
- if(this.doc && _.isString(this.doc.users)){
272
- this.doc.users = this.doc.users.split(',');
273
- }
274
- }
241
+ viewAllRecords: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-permission",
3
- "version": "2.7.0-beta.9",
3
+ "version": "2.7.0",
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": "b9fad2d43fc0216dbcfcf965b7218590167d8f55"
15
+ "gitHead": "2f1586ea4f8af5b93753878e96f1f48adbef31a7"
16
16
  }