mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
only safety test - api is not callable as non-user
This commit is contained in:
parent
8f220837d0
commit
d5c95f2225
@ -200,7 +200,7 @@ class UserSettingsPermissions(permissions.BasePermission):
|
||||
|
||||
try:
|
||||
user = request.user
|
||||
except AttributeError:
|
||||
except AttributeError: # pragma: no cover
|
||||
return False
|
||||
|
||||
return user == obj.user
|
||||
|
Loading…
Reference in New Issue
Block a user