@steedos/service-pages 2.5.6 → 2.5.8-beta.1
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 +10 -0
- package/main/default/translations/zh-CN.translation.yml +9 -0
- package/main/default/triggers/page_assignments_check.trigger.js +8 -8
- package/main/default/triggers/pages_api_name.trigger.js +2 -2
- package/main/default/triggers/pages_check.trigger.js +3 -3
- 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,13 @@ 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
|
|
12
|
+
page_check_error_prohibit_modifying_page_types: Prohibit modifying page types
|
|
13
|
+
page_check_error_prohibit_modifying_page_renderer: Prohibit modifying the page renderer
|
|
14
|
+
page_check_error_prohibit_disabling_application_pages: Prohibit disabling application pages
|
|
15
|
+
page_pai_name_error_not_repeat: Api Name cannot be duplicate
|
|
16
|
+
page_versions_error_prohibit_modifying_non_latest_version: Prohibit modifying non latest version
|
|
17
|
+
|
|
@@ -5,3 +5,12 @@ 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
|
+
page_check_error_prohibit_modifying_page_types: 禁止修改页面类型
|
|
13
|
+
page_check_error_prohibit_modifying_page_renderer: 禁止修改页面渲染器
|
|
14
|
+
page_check_error_prohibit_disabling_application_pages: 禁止停用应用程序页面
|
|
15
|
+
page_pai_name_error_not_repeat: Api Name 不能重复
|
|
16
|
+
page_versions_error_prohibit_modifying_non_latest_version: 禁止修改非最新版
|
|
@@ -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
|
}
|
|
@@ -7,7 +7,7 @@ module.exports = {
|
|
|
7
7
|
const {object_name, doc, spaceId} = this;
|
|
8
8
|
const isUnique = await apiName.isSpaceUnique(spaceId, object_name, doc, doc.name)
|
|
9
9
|
if(!isUnique){
|
|
10
|
-
throw new Error('
|
|
10
|
+
throw new Error('page_pai_name_error_not_repeat');
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ module.exports = {
|
|
|
16
16
|
if(_.has(doc, 'name')){
|
|
17
17
|
const isUnique = await apiName.isSpaceUnique(spaceId, object_name, doc, doc.name, id)
|
|
18
18
|
if(!isUnique){
|
|
19
|
-
throw new Error('
|
|
19
|
+
throw new Error('page_pai_name_error_not_repeat');
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -7,10 +7,10 @@ module.exports = {
|
|
|
7
7
|
if(_.has(doc, 'type') || _.has(doc, 'render_engine')){
|
|
8
8
|
const record = await objectql.getObject('pages').findOne(id);
|
|
9
9
|
if(_.has(doc, 'type') && doc.type != record.type){
|
|
10
|
-
throw new Error('
|
|
10
|
+
throw new Error('page_check_error_prohibit_modifying_page_types');
|
|
11
11
|
}
|
|
12
12
|
if(_.has(doc, 'render_engine') && doc.render_engine != record.render_engine){
|
|
13
|
-
throw new Error('
|
|
13
|
+
throw new Error('page_check_error_prohibit_modifying_page_renderer');
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -23,7 +23,7 @@ module.exports = {
|
|
|
23
23
|
type = record.type;
|
|
24
24
|
}
|
|
25
25
|
if(type === 'app'){
|
|
26
|
-
throw new Error('
|
|
26
|
+
throw new Error('page_check_error_prohibit_disabling_application_pages');
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-pages",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.8-beta.1",
|
|
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": "166b520670f2e3c7ed51e84785c8901886a31e71",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"ejs": "^3.1.8"
|
|
14
14
|
}
|