@steedos/service-core-objects 3.0.13-beta.9 → 3.0.14-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.
@@ -45,6 +45,10 @@ fields:
45
45
  label: Shared to which organizations?
46
46
  help:
47
47
  description:
48
+ filter_required:
49
+ label: Filter Required
50
+ help: When enabled, users must set filter conditions before data is loaded.
51
+ description:
48
52
  show_count:
49
53
  label: Show Record Count
50
54
  help:
@@ -42,6 +42,10 @@ fields:
42
42
  label: 共享列表视图给哪些组织?
43
43
  help:
44
44
  description:
45
+ filter_required:
46
+ label: 要求先筛选
47
+ help: 启用后,用户必须先设置过滤条件才会请求数据。
48
+ description:
45
49
  show_count:
46
50
  label: 显示条目数
47
51
  help:
@@ -10,6 +10,10 @@ fields:
10
10
  label: Space Owner
11
11
  help:
12
12
  description:
13
+ password_expiry_days:
14
+ label: Password Expiry Days
15
+ help: Number of days after which users must change their password. Leave empty to disable password expiry.
16
+ description:
13
17
  admins:
14
18
  label: Admins
15
19
  help:
@@ -52,6 +56,7 @@ fields:
52
56
  description:
53
57
  groups:
54
58
  register_account: Register account
59
+ Security: Security
55
60
  developer: Developer
56
61
  listviews:
57
62
  all:
@@ -10,6 +10,10 @@ fields:
10
10
  label: 所有者
11
11
  help:
12
12
  description:
13
+ password_expiry_days:
14
+ label: 密码过期天数
15
+ help: 用户必须修改密码的天数。留空表示禁用密码过期。
16
+ description:
13
17
  admins:
14
18
  label: 管理员
15
19
  help:
@@ -52,6 +56,7 @@ fields:
52
56
  description:
53
57
  groups:
54
58
  register_account: 用户自助注册
59
+ Security: 安全
55
60
  developer: 华炎云
56
61
  listviews:
57
62
  all:
@@ -63,6 +63,10 @@ fields:
63
63
  label: Password expired
64
64
  help:
65
65
  description:
66
+ password_modified_at:
67
+ label: Password Modified At
68
+ help:
69
+ description:
66
70
  company_id:
67
71
  label:
68
72
  help:
@@ -60,7 +60,11 @@ fields:
60
60
  help:
61
61
  description:
62
62
  password_expired:
63
- label: Password expired
63
+ label: 密码已过期
64
+ help:
65
+ description:
66
+ password_modified_at:
67
+ label: 密码修改时间
64
68
  help:
65
69
  description:
66
70
  company_id:
@@ -0,0 +1,49 @@
1
+ name: OAuth2AccessTokens
2
+ icon: entity
3
+ label: OAuth2 Token
4
+ enable_search: false
5
+ hidden: true
6
+ fields:
7
+ userId:
8
+ label: User
9
+ type: lookup
10
+ reference_to: users
11
+ sortable: true
12
+ filterable: true
13
+ expires:
14
+ type: datetime
15
+ label: Expiration Time
16
+ clientId:
17
+ type: text
18
+ label: Client ID
19
+ omit: true
20
+ defaultValue: creator
21
+ accessToken:
22
+ type: text
23
+ label: Token
24
+ defaultValue: !<tag:yaml.org,2002:js/function> |-
25
+ function () {
26
+ return Random.id(38);
27
+ }
28
+ list_views:
29
+ all:
30
+ label: All OAuth2 Access Tokens
31
+ columns:
32
+ - userId
33
+ - expires
34
+ - accessToken
35
+ permission_set:
36
+ user:
37
+ allowCreate: false
38
+ allowDelete: false
39
+ allowEdit: false
40
+ allowRead: false
41
+ modifyAllRecords: false
42
+ viewAllRecords: false
43
+ admin:
44
+ allowCreate: true
45
+ allowDelete: true
46
+ allowEdit: true
47
+ allowRead: true
48
+ modifyAllRecords: true
49
+ viewAllRecords: true
@@ -0,0 +1,63 @@
1
+ name: OAuth2Clients
2
+ icon: entity
3
+ label: OAuth2 Client
4
+ hidden: true
5
+ enable_search: false
6
+ fields:
7
+ clientName:
8
+ type: text
9
+ label: Name
10
+ is_name: true
11
+ required: true
12
+ searchable: true
13
+ active:
14
+ type: boolean
15
+ label: Active
16
+ defaultValue: true
17
+ expires:
18
+ type: number
19
+ label: Term of Validity(HOUR)
20
+ defaultValue: '1'
21
+ redirectUri:
22
+ type: text
23
+ label: Callback URL
24
+ is_wide: true
25
+ required: true
26
+ clientId:
27
+ type: text
28
+ label: Client ID
29
+ is_wide: true
30
+ defaultValue: !<tag:yaml.org,2002:js/function> |-
31
+ function () {
32
+ return Random.id();
33
+ }
34
+ clientSecret:
35
+ type: text
36
+ label: Secret
37
+ is_wide: true
38
+ defaultValue: !<tag:yaml.org,2002:js/function> |-
39
+ function () {
40
+ return Random.secret();
41
+ }
42
+ list_views:
43
+ all:
44
+ label: All OAuth2 Clients
45
+ columns:
46
+ - clientName
47
+ - active
48
+ - redirectUri
49
+ permission_set:
50
+ user:
51
+ allowCreate: false
52
+ allowDelete: false
53
+ allowEdit: false
54
+ allowRead: false
55
+ modifyAllRecords: false
56
+ viewAllRecords: false
57
+ admin:
58
+ allowCreate: true
59
+ allowDelete: true
60
+ allowEdit: true
61
+ allowRead: true
62
+ modifyAllRecords: true
63
+ viewAllRecords: true
@@ -12,6 +12,12 @@ var standardCustomizeSaveRequestAdaptor = `
12
12
  delete newDoc.__filename;
13
13
  delete newDoc.responseData;
14
14
  delete newDoc.responseStatus;
15
+ console.log('newDoc.nav_schema', newDoc.nav_schema);
16
+ if(newDoc.nav_schema){
17
+ if(typeof newDoc.nav_schema !== 'string'){
18
+ newDoc.nav_schema = JSON.stringify(newDoc.nav_schema);
19
+ }
20
+ }
15
21
  }
16
22
  else if(objectName === "permission_set"){
17
23
  objectFields = ['name', 'label', 'type', 'license', 'lockout_interval', 'max_login_attempts', 'password_history', 'default_standard_buttons', 'assigned_apps'];
@@ -300,6 +300,14 @@ fields:
300
300
  sort_no: 900
301
301
  group: advanced
302
302
  visible_on: '${type != ''calendar'' && type != ''timeline''}'
303
+ filter_required:
304
+ name: filter_required
305
+ label: Filter Required
306
+ inlineHelpText: When enabled, users must set filter conditions before data is loaded.
307
+ type: boolean
308
+ defaultValue: false
309
+ sort_no: 902
310
+ group: advanced
303
311
  filter_fields:
304
312
  name: filter_fields
305
313
  label: Default Filter Fields
@@ -26,7 +26,7 @@ module.exports = {
26
26
  type: 'post', async: false, data: JSON.stringify({
27
27
  space_user_id: record_id,
28
28
  space_id: userSession.spaceId,
29
- password: CryptoJS.SHA256(inputValue).toString()
29
+ password: window.sha256(inputValue).toString()
30
30
  })
31
31
  });
32
32
  if (!result) {
@@ -70,6 +70,29 @@ module.exports = {
70
70
  autoComplete: "new-password",
71
71
  className: "ant-input",
72
72
  ref: inputRef,
73
+ style: {
74
+ WebkitBoxSizing: 'border-box',
75
+ boxSizing: 'border-box',
76
+ margin: 0,
77
+ padding: '4px 11px',
78
+ fontVariant: 'tabular-nums',
79
+ listStyle: 'none',
80
+ WebkitFontFeatureSettings: "'tnum'",
81
+ fontFeatureSettings: "'tnum'",
82
+ position: 'relative',
83
+ display: 'inline-block',
84
+ width: '100%',
85
+ height: '32px',
86
+ color: 'rgba(0, 0, 0, 0.65)',
87
+ fontSize: '14px',
88
+ lineHeight: 1.5,
89
+ backgroundColor: '#fff',
90
+ backgroundImage: 'none',
91
+ border: '1px solid #d9d9d9',
92
+ borderRadius: '4px',
93
+ WebkitTransition: 'all 0.3s',
94
+ transition: 'all 0.3s',
95
+ }
73
96
  // onKeyDown: (event) => {
74
97
  // // 禁用ctrlKey/metaKey+c/v/a,复制、剪切、粘贴、全选,其中metaKey是mac系统中相关操作的辅助键
75
98
  // if ((event.ctrlKey || event.metaKey) && [67, 88, 86, 65].indexOf(event.keyCode) > -1) {
@@ -112,6 +112,13 @@ fields:
112
112
  omit: false
113
113
  hidden: false
114
114
  sort_no: 110
115
+ password_expiry_days:
116
+ name: password_expiry_days
117
+ label: Password Expiry Days
118
+ type: number
119
+ inlineHelpText: Number of days after which users must change their password. Leave empty to disable password expiry.
120
+ sort_no: 120
121
+ min: 0
115
122
  services:
116
123
  name: services
117
124
  type: object
@@ -126,6 +126,13 @@ fields:
126
126
  omit: true
127
127
  hidden: true
128
128
  sort_no: 230
129
+ password_modified_at:
130
+ name: password_modified_at
131
+ label: Password Modified At
132
+ type: datetime
133
+ omit: true
134
+ hidden: true
135
+ sort_no: 235
129
136
  primary_email_verified:
130
137
  name: primary_email_verified
131
138
  type: boolean
@@ -32,7 +32,7 @@ router.get('/api/amisButtonDesign', auth.requireAuthentication, async function (
32
32
  }
33
33
  const retUrl = process.env.ROOT_URL + `/app/admin/object_actions/view/${req.query.id}`
34
34
  const steedosBuilderUrl = process.env.STEEDOS_BUILDER_URL || 'https://builder.steedos.cn';
35
- const builderHost = `${steedosBuilderUrl}/amis?${assetUrl}locale=${locale}&retUrl=${retUrl}`;
35
+ const builderHost = `${steedosBuilderUrl}/amis?${assetUrl}locale=${locale}&retUrl=${retUrl}&unpkgUrl=${process.env.STEEDOS_UNPKG_URL || 'https://unpkg.steedos.cn'}`;
36
36
 
37
37
  // let data = fs.readFileSync(__dirname+'/design.html', 'utf8');
38
38
  // res.send(data.replace('SteedosBuilderHost',steedosBuilderHost).replace('DataContext', JSON.stringify(dataContext)));
@@ -32,7 +32,7 @@ router.get('/api/amisListviewDesign', auth.requireAuthentication, async function
32
32
  }
33
33
  const retUrl = process.env.ROOT_URL + `/app/admin/object_listviews/view/${req.query.id}`
34
34
  const steedosBuilderUrl = process.env.STEEDOS_BUILDER_URL || 'https://builder.steedos.cn';
35
- const builderHost = `${steedosBuilderUrl}/amis?${assetUrl}locale=${locale}&retUrl=${retUrl}`;
35
+ const builderHost = `${steedosBuilderUrl}/amis?${assetUrl}locale=${locale}&retUrl=${retUrl}&unpkgUrl=${process.env.STEEDOS_UNPKG_URL || 'https://unpkg.steedos.cn'}`;
36
36
  const record = await objectql.getObject('object_listviews').findOne(req.query.id);
37
37
  // let data = fs.readFileSync(__dirname+'/design.html', 'utf8');
38
38
  // res.send(data.replace('SteedosBuilderHost',steedosBuilderHost).replace('DataContext', JSON.stringify(dataContext)));
@@ -31,7 +31,7 @@ router.get('/api/amisObjectFieldsDesign', auth.requireAuthentication, async func
31
31
  }
32
32
  const retUrl = req.query.retUrl || process.env.ROOT_URL + '/app/admin/objects/view/' + req.query.oid
33
33
  const steedosBuilderUrl = process.env.STEEDOS_BUILDER_URL || 'https://builder.steedos.cn';
34
- const builderHost = `${steedosBuilderUrl}/object?${assetUrl}retUrl=${retUrl}&locale=${locale}&isObjectDesign=1&pType=objectDesign`;
34
+ const builderHost = `${steedosBuilderUrl}/object?${assetUrl}retUrl=${retUrl}&locale=${locale}&isObjectDesign=1&pType=objectDesign&unpkgUrl=${process.env.STEEDOS_UNPKG_URL || 'https://unpkg.steedos.cn'}`;
35
35
 
36
36
  const filename = __dirname+'/object_fields_design.ejs'
37
37
  const data = {
@@ -129,7 +129,7 @@ module.exports = {
129
129
  const suObj = objectql.getObject('space_users')
130
130
  const spaceObj = objectql.getObject('spaces')
131
131
  // 工作区修改后,该工作区的根部门的name也要修改,根部门和子部门的fullname也要修改
132
- if (doc.name) {
132
+ if (doc.name && doc.name !== previousDoc.name) {
133
133
  const spaceDoc = await spaceObj.findOne(id)
134
134
  // 直接修改根部门名字,跳过验证
135
135
  const rootOrg = (await orgObj.find({
@@ -45,4 +45,5 @@ exports.parsePassword = function(newPassword, options){
45
45
  }
46
46
  options.services.password.bcrypt = bcrypt;
47
47
  options.password_expired = false;
48
+ options.password_modified_at = new Date();
48
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-core-objects",
3
- "version": "3.0.13-beta.9",
3
+ "version": "3.0.14-beta.1",
4
4
  "main": "package.service.js",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,7 +9,7 @@
9
9
  "steedos"
10
10
  ],
11
11
  "dependencies": {
12
- "@steedos/service-package-loader": "3.0.13-beta.9",
12
+ "@steedos/service-package-loader": "3.0.14-beta.1",
13
13
  "bcryptjs": "^3.0.3",
14
14
  "json2xls": "^0.1.2",
15
15
  "lodash": "^4.17.21"
@@ -17,5 +17,5 @@
17
17
  "description": "steedos package",
18
18
  "repository": {},
19
19
  "license": "MIT",
20
- "gitHead": "3195edc9120425e3384ce713160bc77d585612f9"
20
+ "gitHead": "cfda80963d2a7acc1e1d387808824dc52c2348cd"
21
21
  }