asv-hlps 1.2.82 → 1.2.84
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/cjs/auth.js +1 -1
- package/lib/esm/auth.js +1 -1
- package/package.json +1 -1
package/lib/cjs/auth.js
CHANGED
|
@@ -17,7 +17,7 @@ const getAuth = (authUser, authSte, param) => {
|
|
|
17
17
|
}
|
|
18
18
|
if ((_a = param === null || param === void 0 ? void 0 : param.roles) === null || _a === void 0 ? void 0 : _a.length) {
|
|
19
19
|
// return isStaffSte(authSte, authUser) && ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase());
|
|
20
|
-
return (0, user_1.isStaffSte)(authSte, authUser) ? ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase()) :
|
|
20
|
+
return (0, user_1.isStaffSte)(authSte, authUser) ? ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase()) : false;
|
|
21
21
|
// ------ multi roles ------
|
|
22
22
|
// return param?.roles?.length ? this.checkRoles(["sadm", ...param.roles]) : false;
|
|
23
23
|
// }
|
package/lib/esm/auth.js
CHANGED
|
@@ -14,7 +14,7 @@ const getAuth = (authUser, authSte, param) => {
|
|
|
14
14
|
}
|
|
15
15
|
if ((_a = param === null || param === void 0 ? void 0 : param.roles) === null || _a === void 0 ? void 0 : _a.length) {
|
|
16
16
|
// return isStaffSte(authSte, authUser) && ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase());
|
|
17
|
-
return isStaffSte(authSte, authUser) ? ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase()) :
|
|
17
|
+
return isStaffSte(authSte, authUser) ? ["sadm", ...param.roles].includes(authUser.role.code.toLowerCase()) : false;
|
|
18
18
|
// ------ multi roles ------
|
|
19
19
|
// return param?.roles?.length ? this.checkRoles(["sadm", ...param.roles]) : false;
|
|
20
20
|
// }
|