@things-factory/auth-base 6.2.44 → 6.2.48

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": "6.2.44",
3
+ "version": "6.2.48",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -30,11 +30,11 @@
30
30
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
31
31
  },
32
32
  "dependencies": {
33
- "@things-factory/email-base": "^6.2.44",
33
+ "@things-factory/email-base": "^6.2.48",
34
34
  "@things-factory/env": "^6.2.33",
35
- "@things-factory/i18n-base": "^6.2.44",
36
- "@things-factory/shell": "^6.2.44",
37
- "@things-factory/utils": "^6.2.33",
35
+ "@things-factory/i18n-base": "^6.2.48",
36
+ "@things-factory/shell": "^6.2.48",
37
+ "@things-factory/utils": "^6.2.48",
38
38
  "jsonwebtoken": "^9.0.0",
39
39
  "koa-passport": "^6.0.0",
40
40
  "koa-session": "^6.4.0",
@@ -43,5 +43,5 @@
43
43
  "passport-local": "^1.0.0",
44
44
  "popsicle-cookie-jar": "^1.0.0"
45
45
  },
46
- "gitHead": "a2a1ebf823f6b1315e751b12a01372e9a867d7af"
46
+ "gitHead": "70ed4f01ef662cde4d99911dc9374abd564cbe0e"
47
47
  }
@@ -67,7 +67,7 @@ authPrivateProcessRouter
67
67
  clearAccessTokenCookie(context)
68
68
  })
69
69
  .get('/profile', async (context, next) => {
70
- const { domain, user } = context.state
70
+ const { domain, user, protected: protectedIP } = context.state
71
71
 
72
72
  let domains: Partial<Domain>[] = await getUserDomains(user)
73
73
  domains = domains.filter((d: Domain) => d.extType == domainType)
@@ -79,6 +79,7 @@ authPrivateProcessRouter
79
79
  userType: user.userType,
80
80
  owner: await process.domainOwnerGranted(domain, user),
81
81
  super: await process.superUserGranted(domain, user),
82
+ protected: protectedIP,
82
83
  privileges: await User.getPrivilegesByDomain(user, domain)
83
84
  },
84
85
  domains,
@@ -27,6 +27,9 @@ export class PrivilegeObject {
27
27
 
28
28
  @Field({ nullable: true })
29
29
  super?: boolean
30
+
31
+ @Field({ nullable: true })
32
+ protected?: boolean
30
33
  }
31
34
 
32
35
  @InputType()
@@ -42,6 +45,9 @@ export class PrivilegeInput {
42
45
 
43
46
  @Field({ nullable: true })
44
47
  super?: boolean
48
+
49
+ @Field({ nullable: true })
50
+ protected?: boolean
45
51
  }
46
52
 
47
53
  @Entity()