@steedos/standard-permission 2.4.0-beta.24 → 2.4.0-beta.26
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/objects/permission_fields.object.yml +0 -18
- package/main/default/objects/permission_objects.action.js +8 -5
- package/main/default/objects/permission_objects.object.yml +0 -18
- package/main/default/objects/permission_set/buttons/permission_set.action.js +2 -1
- package/main/default/objects/permission_shares.object.yml +3 -6
- package/main/default/objects/permission_tabs/buttons/customize.button.js +2 -1
- package/main/default/objects/restriction_rules.action.js +2 -1
- package/main/default/objects/restriction_rules.object.yml +0 -4
- package/main/default/objects/share_rules.action.js +2 -1
- package/package.json +2 -2
|
@@ -43,24 +43,6 @@ fields:
|
|
|
43
43
|
required: true
|
|
44
44
|
create: false
|
|
45
45
|
sort_no: 130
|
|
46
|
-
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
47
|
-
function () {
|
|
48
|
-
var _options;
|
|
49
|
-
|
|
50
|
-
_options = [];
|
|
51
|
-
|
|
52
|
-
_.forEach(Creator.objectsByName, function (o, k) {
|
|
53
|
-
if (!o.hidden) {
|
|
54
|
-
return _options.push({
|
|
55
|
-
label: o.label,
|
|
56
|
-
value: k,
|
|
57
|
-
icon: o.icon
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
return _options;
|
|
63
|
-
}
|
|
64
46
|
name: object_name
|
|
65
47
|
filterable: true
|
|
66
48
|
field:
|
|
@@ -11,13 +11,13 @@ module.exports = {
|
|
|
11
11
|
delete newDoc.is_system;
|
|
12
12
|
|
|
13
13
|
let permissionSetId = doc.permission_set_id
|
|
14
|
-
if(_.
|
|
14
|
+
if(_.includes(['admin','user','supplier','customer'], doc.permission_set_id)){
|
|
15
15
|
let dbPst = Creator.odata.query('permission_set', {$select: "_id", $filter: "(name eq '"+doc.permission_set_id+"') and (space eq '"+Steedos.getSpaceId()+"')"}, true)
|
|
16
16
|
if(dbPst && dbPst.length > 0){
|
|
17
17
|
permissionSetId = dbPst[0]._id;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
if(_.
|
|
20
|
+
if(_.includes(['admin','user','supplier','customer'], permissionSetId)){
|
|
21
21
|
return toastr.error("请先自定义权限集")
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -32,7 +32,8 @@ module.exports = {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
},
|
|
35
|
-
customizeVisible: function(object_name, record_id, record_permissions,
|
|
35
|
+
customizeVisible: function(object_name, record_id, record_permissions, data){
|
|
36
|
+
var record = data && data.record;
|
|
36
37
|
if(!record){
|
|
37
38
|
record = {}
|
|
38
39
|
}
|
|
@@ -48,10 +49,12 @@ module.exports = {
|
|
|
48
49
|
FlowRouter.reload();
|
|
49
50
|
}
|
|
50
51
|
},
|
|
51
|
-
resetFieldPermissionsVisible: function (object_name, record_id, record_permissions,
|
|
52
|
+
resetFieldPermissionsVisible: function (object_name, record_id, record_permissions, data) {
|
|
53
|
+
var record = data && data.record;
|
|
52
54
|
if (!record) {
|
|
53
55
|
record = {}
|
|
54
56
|
}
|
|
55
|
-
return
|
|
57
|
+
return Creator.baseObject.actions.standard_new.visible() && !record.is_system;
|
|
58
|
+
// return !(Creator.baseObject.actions.standard_new.visible() && record.is_system);
|
|
56
59
|
}
|
|
57
60
|
}
|
|
@@ -29,24 +29,6 @@ fields:
|
|
|
29
29
|
index: true
|
|
30
30
|
required: true
|
|
31
31
|
create: false
|
|
32
|
-
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
33
|
-
function () {
|
|
34
|
-
var _options;
|
|
35
|
-
|
|
36
|
-
_options = [];
|
|
37
|
-
|
|
38
|
-
_.forEach(Creator.objectsByName, function (o, k) {
|
|
39
|
-
if (!o.hidden) {
|
|
40
|
-
return _options.push({
|
|
41
|
-
label: o.label,
|
|
42
|
-
value: k,
|
|
43
|
-
icon: o.icon
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return _options;
|
|
49
|
-
}
|
|
50
32
|
name: object_name
|
|
51
33
|
filterable: true
|
|
52
34
|
allowRead:
|
|
@@ -8,7 +8,8 @@ module.exports = {
|
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
},
|
|
11
|
-
customizeVisible: function(object_name, record_id, record_permissions,
|
|
11
|
+
customizeVisible: function(object_name, record_id, record_permissions, data){
|
|
12
|
+
var record = data && data.record;
|
|
12
13
|
if(!record){
|
|
13
14
|
record = {}
|
|
14
15
|
}
|
|
@@ -13,12 +13,9 @@ fields:
|
|
|
13
13
|
label: Object
|
|
14
14
|
type: lookup
|
|
15
15
|
multiple: true
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return o.enable_share
|
|
20
|
-
})
|
|
21
|
-
}
|
|
16
|
+
reference_to: objects
|
|
17
|
+
reference_to_field: name
|
|
18
|
+
filters: ["enable_share", "=", true]
|
|
22
19
|
required: true
|
|
23
20
|
filterable: true
|
|
24
21
|
filters:
|
|
@@ -24,7 +24,8 @@ module.exports = {
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
},
|
|
27
|
-
customizeVisible: function (object_name, record_id, record_permissions,
|
|
27
|
+
customizeVisible: function (object_name, record_id, record_permissions, data) {
|
|
28
|
+
var record = data && data.record;
|
|
28
29
|
return record && Creator.baseObject.actions.standard_new.visible() && record.is_system;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -16,7 +16,8 @@ module.exports = {
|
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
},
|
|
19
|
-
customizeVisible: function (object_name, record_id, record_permissions,
|
|
19
|
+
customizeVisible: function (object_name, record_id, record_permissions, data) {
|
|
20
|
+
var record = data && data.record;
|
|
20
21
|
if (!record) {
|
|
21
22
|
record = {}
|
|
22
23
|
}
|
|
@@ -16,7 +16,8 @@ module.exports = {
|
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
},
|
|
19
|
-
customizeVisible: function (object_name, record_id, record_permissions,
|
|
19
|
+
customizeVisible: function (object_name, record_id, record_permissions, data) {
|
|
20
|
+
var record = data && data.record;
|
|
20
21
|
if (!record) {
|
|
21
22
|
record = {}
|
|
22
23
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-permission",
|
|
3
|
-
"version": "2.4.0-beta.
|
|
3
|
+
"version": "2.4.0-beta.26",
|
|
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": "bdcc1c0dade33d528ae0d5c0552e2b66b5a1e783"
|
|
16
16
|
}
|