Skip to content

Commit

Permalink
fix(server): do not check authorisation when calling setDoorState export
Browse files Browse the repository at this point in the history
Resolves #158.
  • Loading branch information
thelindat committed Aug 12, 2023
1 parent 8aff718 commit ca6b8e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ local function setDoorState(id, state, lockpick)
state = (state == 1 or state == 0) and state or (state and 1 or 0)

if door then
local authorised = source == '' or isAuthorised(source, door, lockpick)
local authorised = not source or source == '' or isAuthorised(source, door, lockpick)

if authorised then
door.state = state
Expand Down

0 comments on commit ca6b8e5

Please sign in to comment.