@steedos/service-pages 2.5.6-beta.6 → 2.5.7
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/objectTranslations/page_assignments.en/page_assignments.en.objectTranslation.yml +14 -14
- package/main/default/translations/en.translation.yml +4 -0
- package/main/default/translations/zh-CN.translation.yml +5 -0
- package/main/default/triggers/page_assignments_check.trigger.js +8 -8
- package/package.json +2 -2
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
name: page_assignments
|
|
2
|
-
label:
|
|
2
|
+
label: Page Assignments
|
|
3
3
|
description:
|
|
4
4
|
fields:
|
|
5
5
|
app:
|
|
6
|
-
label:
|
|
6
|
+
label: App
|
|
7
7
|
help:
|
|
8
8
|
description:
|
|
9
9
|
desktop:
|
|
10
|
-
label:
|
|
10
|
+
label: Desktop
|
|
11
11
|
help:
|
|
12
12
|
description:
|
|
13
13
|
is_system:
|
|
14
|
-
label:
|
|
14
|
+
label: System
|
|
15
15
|
help:
|
|
16
16
|
description:
|
|
17
17
|
mobile:
|
|
18
|
-
label:
|
|
18
|
+
label: Mobile
|
|
19
19
|
help:
|
|
20
20
|
description:
|
|
21
21
|
page:
|
|
22
|
-
label:
|
|
22
|
+
label: Page
|
|
23
23
|
help:
|
|
24
24
|
description:
|
|
25
25
|
profile:
|
|
26
|
-
label:
|
|
26
|
+
label: Profile
|
|
27
27
|
help:
|
|
28
28
|
description:
|
|
29
29
|
record_type:
|
|
30
|
-
label:
|
|
30
|
+
label: Record Type
|
|
31
31
|
help:
|
|
32
32
|
description:
|
|
33
33
|
type:
|
|
34
|
-
label:
|
|
34
|
+
label: Authorization Type
|
|
35
35
|
help:
|
|
36
36
|
options:
|
|
37
|
-
- label:
|
|
37
|
+
- label: Organization Default Settings
|
|
38
38
|
value: orgDefault
|
|
39
|
-
- label:
|
|
39
|
+
- label: Application Default Settings
|
|
40
40
|
value: appDefault
|
|
41
|
-
- label:
|
|
41
|
+
- label: Applications and Profiles
|
|
42
42
|
value: appRecordProfile
|
|
43
43
|
description:
|
|
44
44
|
listviews:
|
|
45
45
|
all:
|
|
46
|
-
label:
|
|
46
|
+
label: All
|
|
47
47
|
recent:
|
|
48
|
-
label:
|
|
48
|
+
label: Recently Viewed
|
|
@@ -5,3 +5,7 @@ CustomApplications:
|
|
|
5
5
|
CustomLabels:
|
|
6
6
|
menu_user_interface: User Interface
|
|
7
7
|
menu_pages: Mini Page
|
|
8
|
+
page_assignments_error_not_allowed_to_application_pages: Prohibit assigning permissions to application pages
|
|
9
|
+
page_assignments_error_organization_default_already_exists: Authorization for 'Organization Default Settings' already exists
|
|
10
|
+
page_assignments_error_application_default_already_exists: Authorization for 'Application Default Settings' already exists
|
|
11
|
+
page_assignments_error_application_and_profile_already_exists: Application and Profile authorization already exists
|
|
@@ -5,3 +5,8 @@ CustomApplications:
|
|
|
5
5
|
CustomLabels:
|
|
6
6
|
menu_user_interface: 用户界面
|
|
7
7
|
menu_pages: 微页面
|
|
8
|
+
page_assignments_error_not_allowed_to_application_pages: 禁止给应用程序页面分配权限
|
|
9
|
+
page_assignments_error_organization_default_settings_already_exists: 已存在「组织默认设置」授权
|
|
10
|
+
page_assignments_error_application_default_already_exists: 已存在「应用程序默认设置」授权
|
|
11
|
+
page_assignments_error_application_and_profile_already_exists: 已存在「应用程序和简档」授权
|
|
12
|
+
|
|
@@ -7,7 +7,7 @@ module.exports = {
|
|
|
7
7
|
if(doc.page){
|
|
8
8
|
const record = await objectql.getObject('pages').findOne(doc.page);
|
|
9
9
|
if(record.type === 'app'){
|
|
10
|
-
throw new Error('
|
|
10
|
+
throw new Error('page_assignments_error_not_allowed_to_application_pages');
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -23,21 +23,21 @@ module.exports = {
|
|
|
23
23
|
if(doc.type === 'orgDefault'){
|
|
24
24
|
const count = await objectql.getObject('page_assignments').count({filters: [['page', '=', doc.page], ['type', '=', doc.type]]})
|
|
25
25
|
if(count > 0){
|
|
26
|
-
throw new Error("
|
|
26
|
+
throw new Error("page_assignments_error_organization_default_already_exists")
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
if(doc.type === 'appDefault'){
|
|
31
31
|
const count = await objectql.getObject('page_assignments').count({filters: [['page', '=', doc.page], ['type', '=', doc.type], ['app', '=', doc.app]]})
|
|
32
32
|
if(count > 0){
|
|
33
|
-
throw new Error("
|
|
33
|
+
throw new Error("page_assignments_error_application_default_already_exists")
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
if(doc.type === 'appRecordProfile'){
|
|
38
38
|
const count = await objectql.getObject('page_assignments').count({filters: [['page', '=', doc.page], ['type', '=', doc.type], ['app', '=', doc.app], ['profile', '=', doc.profile]]})
|
|
39
39
|
if(count > 0){
|
|
40
|
-
throw new Error("
|
|
40
|
+
throw new Error("page_assignments_error_application_and_profile_already_exists")
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -47,7 +47,7 @@ module.exports = {
|
|
|
47
47
|
if(doc.page){
|
|
48
48
|
const record = await objectql.getObject('pages').findOne(doc.page);
|
|
49
49
|
if(record.type === 'app'){
|
|
50
|
-
throw new Error('
|
|
50
|
+
throw new Error('page_assignments_error_not_allowed_to_application_pages');
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -63,21 +63,21 @@ module.exports = {
|
|
|
63
63
|
if(doc.type === 'orgDefault'){
|
|
64
64
|
const count = await objectql.getObject('page_assignments').count({filters: [['_id', '!=', id], ['page', '=', doc.page], ['type', '=', doc.type]]})
|
|
65
65
|
if(count > 0){
|
|
66
|
-
throw new Error("
|
|
66
|
+
throw new Error("page_assignments_error_organization_default_already_exists")
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
if(doc.type === 'appDefault'){
|
|
71
71
|
const count = await objectql.getObject('page_assignments').count({filters: [['_id', '!=', id], ['page', '=', doc.page], ['type', '=', doc.type], ['app', '=', doc.app]]})
|
|
72
72
|
if(count > 0){
|
|
73
|
-
throw new Error("
|
|
73
|
+
throw new Error("page_assignments_error_application_default_already_exists")
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
if(doc.type === 'appRecordProfile'){
|
|
78
78
|
const count = await objectql.getObject('page_assignments').count({filters: [['_id', '!=', id], ['page', '=', doc.page], ['type', '=', doc.type], ['app', '=', doc.app], ['profile', '=', doc.profile]]})
|
|
79
79
|
if(count > 0){
|
|
80
|
-
throw new Error("
|
|
80
|
+
throw new Error("page_assignments_error_application_and_profile_already_exists")
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-pages",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.7",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"scripts": {},
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "6a8199c9046ec05c8e05fc7588789cd16b7092bb",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"ejs": "^3.1.8"
|
|
14
14
|
}
|