@steedos/service-saas 2.3.2-beta.4 → 2.3.2-beta.6

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.
Files changed (30) hide show
  1. package/main/default/objects/datasources/permissions/admin.permission.yml +7 -0
  2. package/main/default/objects/object_actions/permissions/admin.permission.yml +7 -0
  3. package/main/default/objects/object_fields/permissions/admin.permission.yml +7 -0
  4. package/main/default/objects/objects/permissions/admin.permission.yml +7 -0
  5. package/package.json +2 -2
  6. package/package.service.js +59 -3
  7. package/main/default/objects/datasources/buttons/standard_delete.button.js +0 -15
  8. package/main/default/objects/datasources/buttons/standard_delete_many.button.js +0 -8
  9. package/main/default/objects/datasources/buttons/standard_edit.button.js +0 -15
  10. package/main/default/objects/datasources/buttons/standard_new.button.js +0 -15
  11. package/main/default/objects/object_actions/buttons/standard_delete.button.js +0 -15
  12. package/main/default/objects/object_actions/buttons/standard_delete_many.button.js +0 -8
  13. package/main/default/objects/object_actions/buttons/standard_edit.button.js +0 -15
  14. package/main/default/objects/object_actions/buttons/standard_new.button.js +0 -15
  15. package/main/default/objects/object_fields/buttons/standard_delete.button.js +0 -15
  16. package/main/default/objects/object_fields/buttons/standard_delete_many.button.js +0 -8
  17. package/main/default/objects/object_fields/buttons/standard_edit.button.js +0 -15
  18. package/main/default/objects/object_fields/buttons/standard_new.button.js +0 -15
  19. package/main/default/objects/objects/buttons/standard_delete.button.js +0 -15
  20. package/main/default/objects/objects/buttons/standard_delete_many.button.js +0 -8
  21. package/main/default/objects/objects/buttons/standard_edit.button.js +0 -15
  22. package/main/default/objects/objects/buttons/standard_new.button.js +0 -15
  23. package/main/default/objects/steedos_packages/buttons/disable.button.js +0 -14
  24. package/main/default/objects/steedos_packages/buttons/enable.button.js +0 -19
  25. package/main/default/objects/steedos_packages/buttons/installPackageFromUrl.button.js +0 -15
  26. package/main/default/objects/steedos_packages/buttons/install_purchased_packages.button.js +0 -15
  27. package/main/default/objects/steedos_packages/buttons/reload.button.js +0 -19
  28. package/main/default/objects/steedos_packages/buttons/show_packages_store.button.js +0 -15
  29. package/main/default/objects/steedos_packages/buttons/uninstall.button.js +0 -22
  30. package/main/default/objects/steedos_packages/buttons/upgradePackage.button.js +0 -19
@@ -0,0 +1,7 @@
1
+ allowCreate: false
2
+ allowDelete: false
3
+ allowEdit: false
4
+ allowRead: true
5
+ modifyAllRecords: false
6
+ permission_set_id: admin
7
+ viewAllRecords: true
@@ -0,0 +1,7 @@
1
+ allowCreate: false
2
+ allowDelete: false
3
+ allowEdit: false
4
+ allowRead: true
5
+ modifyAllRecords: false
6
+ permission_set_id: admin
7
+ viewAllRecords: true
@@ -0,0 +1,7 @@
1
+ allowCreate: false
2
+ allowDelete: false
3
+ allowEdit: false
4
+ allowRead: true
5
+ modifyAllRecords: false
6
+ permission_set_id: admin
7
+ viewAllRecords: true
@@ -0,0 +1,7 @@
1
+ allowCreate: false
2
+ allowDelete: false
3
+ allowEdit: false
4
+ allowRead: true
5
+ modifyAllRecords: false
6
+ permission_set_id: admin
7
+ viewAllRecords: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-saas",
3
- "version": "2.3.2-beta.4",
3
+ "version": "2.3.2-beta.6",
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": "4c690863ec5e9e5db217aa8fe8232dc73ce72b43"
15
+ "gitHead": "0b66bfd50fc63d938aa75817d93853460e060074"
16
16
  }
@@ -2,13 +2,14 @@
2
2
  * @Author: sunhaolin@hotoa.com
3
3
  * @Date: 1985-10-26 16:15:00
4
4
  * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:12:21
5
+ * @LastEditTime: 2022-11-18 18:04:46
6
6
  * @Description:
7
7
  */
8
8
  "use strict";
9
9
  const project = require('./package.json');
10
10
  const packageName = project.name;
11
11
  const packageLoader = require('@steedos/service-package-loader');
12
+ const validator = require('validator');
12
13
  /**
13
14
  * @typedef {import('moleculer').Context} Context Moleculer's Context
14
15
  */
@@ -23,6 +24,12 @@ module.exports = {
23
24
  packageInfo: {
24
25
  path: __dirname,
25
26
  name: packageName
27
+ },
28
+ jwt: {
29
+ enable: validator.toBoolean(process.env.STEEDOS_IDENTITY_JWT_ENABLED || 'false', true),
30
+ },
31
+ unpkg:{
32
+ enable: validator.toBoolean(process.env.STEEDOS_UNPKG_ENABLE_LOCAL || 'false', true)
26
33
  }
27
34
  },
28
35
 
@@ -55,15 +62,64 @@ module.exports = {
55
62
  /**
56
63
  * Service created lifecycle event handler
57
64
  */
58
- async created() {
65
+ created() {
66
+ //ApiGateway
67
+ this.broker.createService(require('@steedos/service-api'));
68
+
69
+ this.broker.createService(require("@steedos/webapp-public"));
59
70
 
71
+ this.broker.createService(require("@steedos/service-accounts"));
72
+
73
+ this.broker.createService(require("@steedos/service-charts"));
74
+
75
+ this.broker.createService(require("@steedos/service-pages"));
76
+
77
+ this.broker.createService(require("@steedos/service-cloud-init"));
78
+
79
+ this.broker.createService(require("@steedos/service-workflow"));
80
+
81
+ this.broker.createService(require("@steedos/service-plugin-amis"));
82
+
83
+ this.broker.createService(require("@steedos/service-files"));
84
+
85
+ // 故障报告服务
86
+ this.broker.createService(require("@steedos/service-sentry"));
87
+
88
+ // 启动 元数据服务
89
+ this.broker.createService(require("@steedos/service-metadata-server"));
90
+
91
+ // 启动 加载软件包服务
92
+ this.broker.createService(require("@steedos/service-package-registry"));
93
+
94
+ if(this.settings.jwt.enable){
95
+ this.broker.createService(require("@steedos/service-identity-jwt"));
96
+ }
97
+
98
+ // 国际化
99
+ this.broker.createService(require("@steedos/service-i18n"));
100
+
101
+ // 启动 steedos-server 服务
102
+ this.broker.createService(require("@steedos/service-steedos-server"));
103
+ // 启动 本地 CDN
104
+ if (this.settings.unpkg.enable) {
105
+ this.broker.createService(require("@steedos/ee_unpkg-local"));
106
+ }
107
+ else{
108
+ this.broker.createService(require("@steedos/unpkg"));
109
+ }
110
+
111
+ // 启动 登录页面
112
+ this.broker.createService(require("@steedos/webapp-accounts"));
113
+
114
+ // 产品分析
115
+ this.broker.createService(require("@steedos/service-analytics"));
60
116
  },
61
117
 
62
118
  /**
63
119
  * Service started lifecycle event handler
64
120
  */
65
121
  async started() {
66
-
122
+
67
123
  },
68
124
 
69
125
  /**
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:16:57
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 14:04:49
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_deleteVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_delete.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_delete.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- standard_delete_manyVisible: function () {
3
- if(Meteor.settings.public.enable_saas){
4
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_delete_many.visible.apply(this, arguments)
5
- }
6
- return Steedos.StandardObjects.Base.Actions.standard_delete_many.visible.apply(this, arguments)
7
- }
8
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:17:33
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:43:12
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_editVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_edit.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_edit.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:16:57
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:43:25
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_newVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_new.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_new.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:16:57
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:42:50
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_deleteVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_delete.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_delete.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- standard_delete_manyVisible: function () {
3
- if(Meteor.settings.public.enable_saas){
4
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_delete_many.visible.apply(this, arguments)
5
- }
6
- return Steedos.StandardObjects.Base.Actions.standard_delete_many.visible.apply(this, arguments)
7
- }
8
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:17:33
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:43:12
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_editVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_edit.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_edit.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:16:57
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:43:25
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_newVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_new.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_new.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:16:57
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:42:50
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_deleteVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_delete.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_delete.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- standard_delete_manyVisible: function () {
3
- if(Meteor.settings.public.enable_saas){
4
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_delete_many.visible.apply(this, arguments)
5
- }
6
- return Steedos.StandardObjects.Base.Actions.standard_delete_many.visible.apply(this, arguments)
7
- }
8
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:17:33
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:43:12
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_editVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_edit.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_edit.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:16:57
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:43:25
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_newVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_new.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_new.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:16:57
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:42:50
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_deleteVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_delete.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_delete.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- standard_delete_manyVisible: function () {
3
- if(Meteor.settings.public.enable_saas){
4
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_delete_many.visible.apply(this, arguments)
5
- }
6
- return Steedos.StandardObjects.Base.Actions.standard_delete_many.visible.apply(this, arguments)
7
- }
8
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:17:33
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:43:12
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_editVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_edit.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_edit.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 11:16:57
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 11:43:25
6
- * @Description:
7
- */
8
- module.exports = {
9
- standard_newVisible: function () {
10
- if(Meteor.settings.public.enable_saas){
11
- return Creator.USER_CONTEXT.user.spaceId === Creator.USER_CONTEXT.user.masterSpaceId && Steedos.StandardObjects.Base.Actions.standard_new.visible.apply(this, arguments)
12
- }
13
- return Steedos.StandardObjects.Base.Actions.standard_new.visible.apply(this, arguments)
14
- }
15
- }
@@ -1,14 +0,0 @@
1
- module.exports = {
2
- disableVisible: function (object_name, record_id) {
3
-
4
- if(Meteor.settings.public.enable_saas && Creator.USER_CONTEXT.user.spaceId != Creator.USER_CONTEXT.user.masterSpaceId){
5
- return false
6
- }
7
-
8
- const record = Creator.odata.get(object_name, record_id);
9
- if (record.status === 'enable') {
10
- return true;
11
- }
12
- return false
13
- }
14
- }
@@ -1,19 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 13:35:27
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 13:37:53
6
- * @Description:
7
- */
8
- module.exports = {
9
- enableVisible: function (object_name,record_id) {
10
- if(Meteor.settings.public.enable_saas && Creator.USER_CONTEXT.user.spaceId != Creator.USER_CONTEXT.user.masterSpaceId){
11
- return false
12
- }
13
- const record = Creator.odata.get(object_name,record_id);
14
- if(record.status !== 'enable'){
15
- return true;
16
- }
17
- return false
18
- }
19
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 13:35:27
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 13:37:59
6
- * @Description:
7
- */
8
- module.exports = {
9
- installPackageFromUrlVisible: function (object_name, record_id) {
10
- if(Meteor.settings.public.enable_saas && Creator.USER_CONTEXT.user.spaceId != Creator.USER_CONTEXT.user.masterSpaceId){
11
- return false
12
- }
13
- return Steedos.isSpaceAdmin();
14
- }
15
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 13:35:27
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 13:37:56
6
- * @Description:
7
- */
8
- module.exports = {
9
- install_purchased_packagesVisible: function (object_name, record_id) {
10
- if(Meteor.settings.public.enable_saas && Creator.USER_CONTEXT.user.spaceId != Creator.USER_CONTEXT.user.masterSpaceId){
11
- return false
12
- }
13
- return true;
14
- }
15
- }
@@ -1,19 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 13:35:27
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 13:38:02
6
- * @Description:
7
- */
8
- module.exports = {
9
- reloadVisible: function (object_name,record_id) {
10
- if(Meteor.settings.public.enable_saas && Creator.USER_CONTEXT.user.spaceId != Creator.USER_CONTEXT.user.masterSpaceId){
11
- return false
12
- }
13
- const record = Creator.odata.get(object_name,record_id);
14
- if(record.status === 'enable'){
15
- return true;
16
- }
17
- return false
18
- }
19
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 13:35:27
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 13:38:04
6
- * @Description:
7
- */
8
- module.exports = {
9
- show_packages_storeVisible: function () {
10
- if(Meteor.settings.public.enable_saas && Creator.USER_CONTEXT.user.spaceId != Creator.USER_CONTEXT.user.masterSpaceId){
11
- return false
12
- }
13
- return true
14
- }
15
- }
@@ -1,22 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 13:35:27
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 13:38:07
6
- * @Description:
7
- */
8
- module.exports = {
9
- uninstallVisible: function (object_name,record_id) {
10
- if(Meteor.settings.public.enable_saas && Creator.USER_CONTEXT.user.spaceId != Creator.USER_CONTEXT.user.masterSpaceId){
11
- return false
12
- }
13
- const record = Creator.odata.get(object_name,record_id);
14
- if(record.local){
15
- return false;
16
- }
17
- if(record.status){
18
- return true;
19
- }
20
- return false
21
- }
22
- }
@@ -1,19 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-11-15 13:35:27
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2022-11-15 13:38:10
6
- * @Description:
7
- */
8
- module.exports = {
9
- upgradePackageVisible: function (object_name, record_id) {
10
- if(Meteor.settings.public.enable_saas && Creator.USER_CONTEXT.user.spaceId != Creator.USER_CONTEXT.user.masterSpaceId){
11
- return false
12
- }
13
- const record = Creator.odata.get(object_name, record_id);
14
- if (record.status === 'enable' && !record.local) {
15
- return true;
16
- }
17
- return false
18
- }
19
- }