mbkauthe 5.1.0 → 5.1.1
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/middleware/auth.js +1 -1
- package/package.json +1 -1
package/lib/middleware/auth.js
CHANGED
|
@@ -482,7 +482,7 @@ const checkRolePermission = (requiredRoles, notAllowed) => {
|
|
|
482
482
|
try {
|
|
483
483
|
const authUser = req.auth?.user || req.session?.user;
|
|
484
484
|
|
|
485
|
-
if (!authUser || !authUser.
|
|
485
|
+
if (!authUser || !authUser.username) {
|
|
486
486
|
logAuth(`User not authenticated`);
|
|
487
487
|
if (isJsonRequest(req)) {
|
|
488
488
|
return res.status(401).json(createErrorResponse(401, ErrorCodes.SESSION_NOT_FOUND));
|