sumba 1.2.13 → 1.2.14

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/bajo/intl/id.json CHANGED
@@ -99,7 +99,7 @@
99
99
  "manageSite": "Kelola Situs",
100
100
  "manageUser": "Kelola Pengguna",
101
101
  "manageTeam": "Kelola Tim",
102
- "manageTeamUser": "Manage Anggota Tim",
102
+ "manageTeamUser": "Kelola Anggota Tim",
103
103
  "resetUserPassword": "Reset Kata Sandi Pengguna",
104
104
  "unknownUser": "Pengguna Tidak Dikenal/Tidak Valid",
105
105
  "socialMedia": "Media Sosial",
@@ -26,7 +26,6 @@
26
26
  "type": "string",
27
27
  "maxLength": 50,
28
28
  "index": true,
29
- "required": true,
30
29
  "default": "local"
31
30
  }, {
32
31
  "name": "email",
package/index.js CHANGED
@@ -494,6 +494,14 @@ async function factory (pkgName) {
494
494
  jobQueue.payload.data.download = { id: rec.data.id, file }
495
495
  await push(jobQueue)
496
496
  }
497
+
498
+ getApiKeyFromUserId = async id => {
499
+ const { hash } = this.app.bajoExtra
500
+ const { recordGet } = this.app.dobo
501
+ const options = { forceNoHidden: true, noHook: true, noCache: true, attachment: true, mimeType: true }
502
+ const resp = await recordGet('SumbaUser', id, options)
503
+ return await hash(resp.salt)
504
+ }
497
505
  }
498
506
  }
499
507
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "description": "Bajo Framework's Biz Suite",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,4 +8,7 @@
8
8
  }, {
9
9
  "path": "/your-stuff/**/*",
10
10
  "routeHandler": "restapi"
11
+ }, {
12
+ "path": "/manage/**/*",
13
+ "routeHandler": "restapi"
11
14
  }]
@@ -4,7 +4,27 @@ async function teamUser () {
4
4
  layout: [
5
5
  { name: 'meta', fields: ['id', 'createdAt', 'updatedAt'] },
6
6
  { name: 'general', fields: ['userId:6-md', 'teamId:6-md'] }
7
- ]
7
+ ],
8
+ widget: {
9
+ userId: {
10
+ component: 'form-select-ext',
11
+ attr: {
12
+ remoteUrl: 'sumba.restapi:/manage/user',
13
+ remoteSearchField: 'username',
14
+ remoteLabelField: 'username',
15
+ remoteApiKey: true
16
+ }
17
+ },
18
+ teamId: {
19
+ component: 'form-select-ext',
20
+ attr: {
21
+ remoteUrl: 'sumba.restapi:/manage/team',
22
+ remoteSearchField: 'name',
23
+ remoteLabelField: 'name',
24
+ remoteApiKey: true
25
+ }
26
+ }
27
+ }
8
28
  },
9
29
  view: {
10
30
  list: {
@@ -24,7 +24,7 @@
24
24
  "hidden": ["id", "createdAt", "updatedAt", "status"]
25
25
  },
26
26
  "edit": {
27
- "readonly": ["id", "createdAt", "updatedAt", "alias"]
27
+ "readonly": ["id", "createdAt", "updatedAt"]
28
28
  }
29
29
  }
30
30
  }
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "add": {
43
43
  "forceVisible": ["password"],
44
- "hidden": ["id", "createdAt", "updatedAt"]
44
+ "hidden": ["id", "createdAt", "updatedAt", "provider"]
45
45
  },
46
46
  "edit": {
47
47
  "forceVisible": ["password"],
@@ -0,0 +1,4 @@
1
+ {
2
+ "model": "SumbaTeam",
3
+ "disabled": ["create", "update", "remove"]
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "model": "SumbaUser",
3
+ "disabled": ["create", "update", "remove"]
4
+ }