diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-11-20 10:09:18 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-19 14:45:55 +0100 |
commit | ff94c9d11e5121ca61acac523fcc2a77757b5114 (patch) | |
tree | eec458b3f31e70f6c4c93d3ddb81818d8127e703 | |
parent | 88190ec308c1b5c2366e1d1451ac141d5b6367c3 (diff) | |
download | Ishtar-ff94c9d11e5121ca61acac523fcc2a77757b5114.tar.bz2 Ishtar-ff94c9d11e5121ca61acac523fcc2a77757b5114.zip |
🐛 fix model actions for specific permissions
-rw-r--r-- | archaeological_operations/models.py | 2 | ||||
-rw-r--r-- | ishtar_common/models.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 84bd8ab2e..fa5abce22 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -2216,7 +2216,7 @@ class Operation( if can_add_cr and not is_locked: start = actions end = [] - if actions[-1] and actions[-1][0].startswith("/document/create"): + if actions and actions[-1] and actions[-1][0].startswith("/document/create"): start = actions[:-1] end = [actions[-1]] actions = start + [ diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 7ecbe9928..e0cd0929d 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3190,7 +3190,7 @@ class Person(Address, Merge, OwnPerms, ValueGetter, MainItem): actions = super().get_extra_actions(request) # for admin only - if not request.user.is_staff: + if not request.user.ishtaruser.is_ishtaradmin: return actions actions += [ ( |