Skip to content

Commit

Permalink
fix(server): only early-return when authorisation is successful
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Aug 7, 2023
1 parent 87b3f0d commit 92e119d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ function DoesPlayerHaveItem(player, items, alwaysRemove)
end

local function isAuthorised(playerId, door, lockpick)
if Config.PlayerAceAuthorised then
return IsPlayerAceAllowed(playerId, 'command.doorlock')
if Config.PlayerAceAuthorised and IsPlayerAceAllowed(playerId, 'command.doorlock') then
return true
end

-- e.g. add_ace group.police "doorlock.mrpd locker rooms" allow
Expand Down

0 comments on commit 92e119d

Please sign in to comment.