mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 13:56:02 +01:00
Checking if 0 is a string
Checking for roles gives you the permissions id the role is 0 but it should’ve also checked if its "0" it’s now fixed :)
This commit is contained in:
@@ -92,7 +92,7 @@ function validateDepartment(player, department)
|
||||
local roles = getUserDiscordInfo(discordUserId).roles
|
||||
|
||||
for _, roleId in pairs(departmentExists) do
|
||||
if roles[roleId] or roleId == 0 then
|
||||
if roles[roleId] or roleId == 0 or roleId == "0" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -109,7 +109,7 @@ AddEventHandler("checkPerms", function()
|
||||
|
||||
for dept, roleTable in pairs(config.departments) do
|
||||
for _, roleId in pairs(roleTable) do
|
||||
if roles[roleId] or roleId == 0 then
|
||||
if roles[roleId] or roleId == 0 or roleId == "0" then
|
||||
table.insert(allowedRoles, dept)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user