itlab-internal-services 2.4.0 → 2.4.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.
|
@@ -50,7 +50,7 @@ let PermsGuard = class PermsGuard {
|
|
|
50
50
|
// Retrieve the user from the request
|
|
51
51
|
const { user } = ctx.switchToHttp().getRequest();
|
|
52
52
|
// Check if the user is valid and has at least one permission
|
|
53
|
-
const userValid = user && (0, class_validator_1.
|
|
53
|
+
const userValid = user && (0, class_validator_1.arrayMinSize)(user.perms, 1);
|
|
54
54
|
// If the user is valid and has the required permissions, allow access
|
|
55
55
|
if (userValid && (0, itlab_functions_1.hasPermission)(perms, user.perms))
|
|
56
56
|
return true;
|