@nocobase/auth 1.6.0-beta.16 → 1.6.0-beta.18
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/lib/base/auth.js +6 -0
- package/package.json +7 -7
package/lib/base/auth.js
CHANGED
|
@@ -117,6 +117,12 @@ const _BaseAuth = class _BaseAuth extends import_auth.Auth {
|
|
|
117
117
|
raw: true
|
|
118
118
|
})
|
|
119
119
|
) : null;
|
|
120
|
+
if (!user) {
|
|
121
|
+
this.ctx.throw(401, {
|
|
122
|
+
message: this.ctx.t("User not found. Please sign in again to continue.", { ns: localeNamespace }),
|
|
123
|
+
code: import_auth.AuthErrorCode.NOT_EXIST_USER
|
|
124
|
+
});
|
|
125
|
+
}
|
|
120
126
|
if (roleName) {
|
|
121
127
|
this.ctx.headers["x-role"] = roleName;
|
|
122
128
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/auth",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.18",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"main": "./lib/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nocobase/actions": "1.6.0-beta.
|
|
10
|
-
"@nocobase/cache": "1.6.0-beta.
|
|
11
|
-
"@nocobase/database": "1.6.0-beta.
|
|
12
|
-
"@nocobase/resourcer": "1.6.0-beta.
|
|
13
|
-
"@nocobase/utils": "1.6.0-beta.
|
|
9
|
+
"@nocobase/actions": "1.6.0-beta.18",
|
|
10
|
+
"@nocobase/cache": "1.6.0-beta.18",
|
|
11
|
+
"@nocobase/database": "1.6.0-beta.18",
|
|
12
|
+
"@nocobase/resourcer": "1.6.0-beta.18",
|
|
13
|
+
"@nocobase/utils": "1.6.0-beta.18",
|
|
14
14
|
"@types/jsonwebtoken": "^8.5.8",
|
|
15
15
|
"jsonwebtoken": "^8.5.1"
|
|
16
16
|
},
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"url": "git+https://github.com/nocobase/nocobase.git",
|
|
20
20
|
"directory": "packages/auth"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "b6981f549765a1f94fe43a18faa0eae9246fdd98"
|
|
23
23
|
}
|