mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Make device token revokation more explicit
This commit is contained in:
@@ -19,7 +19,7 @@ class DeviceTokenAuthentication(TokenAuthentication):
|
||||
if not device.initialized:
|
||||
raise exceptions.AuthenticationFailed('Device has not been initialized.')
|
||||
|
||||
if not device.api_token:
|
||||
if device.revoked:
|
||||
raise exceptions.AuthenticationFailed('Device access has been revoked.')
|
||||
|
||||
return AnonymousUser(), device
|
||||
|
||||
Reference in New Issue
Block a user