@things-factory/auth-base 8.0.63 → 8.0.74

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/auth-base",
3
- "version": "8.0.63",
3
+ "version": "8.0.74",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -32,10 +32,10 @@
32
32
  "dependencies": {
33
33
  "@simplewebauthn/browser": "^13.0.0",
34
34
  "@simplewebauthn/server": "^13.0.0",
35
- "@things-factory/email-base": "^8.0.63",
36
- "@things-factory/env": "^8.0.37",
37
- "@things-factory/shell": "^8.0.63",
38
- "@things-factory/utils": "^8.0.37",
35
+ "@things-factory/email-base": "^8.0.64",
36
+ "@things-factory/env": "^8.0.64",
37
+ "@things-factory/shell": "^8.0.64",
38
+ "@things-factory/utils": "^8.0.64",
39
39
  "@types/webappsec-credential-management": "^0.6.9",
40
40
  "jsonwebtoken": "^9.0.0",
41
41
  "koa-passport": "^6.0.0",
@@ -46,5 +46,5 @@
46
46
  "passport-jwt": "^4.0.0",
47
47
  "passport-local": "^1.0.0"
48
48
  },
49
- "gitHead": "24ba37efe2e871175a9e4fd816d02d9807491b91"
49
+ "gitHead": "52ffc383d8baed71dd99a2bc85f4253b3fe69977"
50
50
  }
@@ -15,13 +15,14 @@ export async function updateProfile({ id }, newProfiles) {
15
15
  })
16
16
  }
17
17
 
18
- /* only 'username', 'name', 'email' and 'locale' attributes can be changed */
18
+ /* only 'username', 'name', 'email', 'locale' and 'signature' attributes can be changed */
19
19
  var allowed: {
20
20
  username?: string
21
21
  name?: string
22
22
  email?: string
23
23
  locale?: string
24
- } = ['username', 'name', 'email', 'locale']
24
+ signature?: string
25
+ } = ['username', 'name', 'email', 'locale', 'signature']
25
26
  .filter(attr => attr in newProfiles)
26
27
  .reduce((sum, attr) => {
27
28
  sum[attr] = newProfiles[attr]
@@ -101,6 +101,7 @@ authPrivateProcessRouter
101
101
  username: user.username,
102
102
  email: user.email,
103
103
  name: user.name,
104
+ signature: user.signature,
104
105
  userType: user.userType,
105
106
  owner: await process.domainOwnerGranted(domain, user),
106
107
  super: await process.superUserGranted(domain, user),
@@ -114,6 +114,21 @@ export class User {
114
114
  @Field({ nullable: true })
115
115
  locale: string
116
116
 
117
+ @Column({
118
+ nullable: true,
119
+ type:
120
+ DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'
121
+ ? 'longtext'
122
+ : DATABASE_TYPE == 'oracle'
123
+ ? 'clob'
124
+ : DATABASE_TYPE == 'mssql'
125
+ ? 'nvarchar'
126
+ : 'text',
127
+ length: DATABASE_TYPE == 'mssql' ? 'MAX' : undefined
128
+ })
129
+ @Field({ nullable: true })
130
+ signature?: string
131
+
117
132
  @Directive('@privilege(category: "security", privilege: "query", domainOwnerGranted: true)')
118
133
  @Column({ nullable: true })
119
134
  @Field({ nullable: true })
@@ -36,6 +36,7 @@
36
36
  "field.user_account": "user account",
37
37
  "field.user_type": "user type",
38
38
  "label.partner": "partner",
39
+ "label.signature": "signature",
39
40
  "privilege.category.system": "system setting",
40
41
  "privilege.description": "to {name} {category} data",
41
42
  "privilege.name.mutation": "edit",
@@ -36,6 +36,7 @@
36
36
  "field.user_account": "ユーザー アカウント",
37
37
  "field.user_type": "ユーザー タイプ",
38
38
  "label.partner": "パートナー",
39
+ "label.signature": "署名",
39
40
  "privilege.category.system": "システム設定",
40
41
  "privilege.description": "{category}を{name}できる",
41
42
  "privilege.name.mutation": "作成, 修正, 削除",
@@ -36,6 +36,7 @@
36
36
  "field.user_account": "사용자 계정",
37
37
  "field.user_type": "사용자 유형",
38
38
  "label.partner": "파트너",
39
+ "label.signature": "서명",
39
40
  "privilege.category.system": "시스템 설정",
40
41
  "privilege.description": "{category}를 {name}할 수 있음",
41
42
  "privilege.name.mutation": "생성, 수정, 삭제",
@@ -36,6 +36,7 @@
36
36
  "field.user_account": "Akaun pengguna",
37
37
  "field.user_type": "Jenis pengguna",
38
38
  "label.partner": "Rakan kongsi",
39
+ "label.signature": "Tanda tangan",
39
40
  "privilege.category.system": "Tetapan sistem",
40
41
  "privilege.description": "Untuk {name} data {category}",
41
42
  "privilege.name.mutation": "Sunting",
@@ -37,6 +37,7 @@
37
37
  "field.user_account": "用户账号",
38
38
  "field.user_type": "用户类型",
39
39
  "label.partner": "合作伙伴",
40
+ "label.signature": "签名",
40
41
  "privilege.category.system": "系统配置",
41
42
  "privilege.description": "{name} {category}数据",
42
43
  "privilege.name.mutation": "编辑",