Skip to content

Commit 5e9920c

Browse files
committed
fix(floorsense/locker_location_service): support staff can manage lockers
1 parent 8bfe68e commit 5e9920c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/floorsense/locker_location_service.cr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ class Floorsense::LockerLocationService < PlaceOS::Driver
189189
end
190190

191191
# allocates a locker now, the allocation may expire
192-
@[Security(Level::Administrator)]
192+
@[Security(Level::Support)]
193193
def locker_allocate(
194194
# PlaceOS user id
195195
user_id : String,
@@ -225,7 +225,7 @@ class Floorsense::LockerLocationService < PlaceOS::Driver
225225
end
226226

227227
# return the locker to the pool
228-
@[Security(Level::Administrator)]
228+
@[Security(Level::Support)]
229229
def locker_release(
230230
bank_id : String | Int64,
231231
locker_id : String | Int64,
@@ -248,7 +248,7 @@ class Floorsense::LockerLocationService < PlaceOS::Driver
248248
end
249249

250250
# a list of lockers that are allocated to the user
251-
@[Security(Level::Administrator)]
251+
@[Security(Level::Support)]
252252
def lockers_allocated_to(user_id : String) : Array(PlaceLocker)
253253
floorsense_user_id = get_floorsense_user(user_id)
254254
Array(LockerBooking).from_json(floorsense.locker_reservations(
@@ -270,7 +270,7 @@ class Floorsense::LockerLocationService < PlaceOS::Driver
270270
end
271271
end
272272

273-
@[Security(Level::Administrator)]
273+
@[Security(Level::Support)]
274274
def locker_share(
275275
bank_id : String | Int64,
276276
locker_id : String | Int64,
@@ -290,7 +290,7 @@ class Floorsense::LockerLocationService < PlaceOS::Driver
290290
floorsense.locker_share(reservation.reservation_id, share_with).get
291291
end
292292

293-
@[Security(Level::Administrator)]
293+
@[Security(Level::Support)]
294294
def locker_unshare(
295295
bank_id : String | Int64,
296296
locker_id : String | Int64,
@@ -321,7 +321,7 @@ class Floorsense::LockerLocationService < PlaceOS::Driver
321321

322322
# a list of user-ids that the locker is shared with.
323323
# this can be placeos user ids or emails
324-
@[Security(Level::Administrator)]
324+
@[Security(Level::Support)]
325325
def locker_shared_with(
326326
bank_id : String | Int64,
327327
locker_id : String | Int64,
@@ -344,7 +344,7 @@ class Floorsense::LockerLocationService < PlaceOS::Driver
344344
[] of String
345345
end
346346

347-
@[Security(Level::Administrator)]
347+
@[Security(Level::Support)]
348348
def locker_unlock(
349349
bank_id : String | Int64,
350350
locker_id : String | Int64,

0 commit comments

Comments
 (0)