mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-06-13 00:59:45 +00:00
Actually, this should handle an empty list just fine and return False more directly
This commit is contained in:
@@ -20,10 +20,7 @@ class StatusConsumer(AsyncWebsocketConsumer):
|
||||
if user.is_superuser or user.id == owner_id or user.id in users_can_view:
|
||||
return True
|
||||
|
||||
return (
|
||||
groups_can_view
|
||||
and await user.groups.filter(pk__in=groups_can_view).aexists()
|
||||
)
|
||||
return await user.groups.filter(pk__in=groups_can_view).aexists()
|
||||
|
||||
async def connect(self) -> None:
|
||||
if not self._authenticated():
|
||||
|
||||
Reference in New Issue
Block a user