diff options
Diffstat (limited to 'archaeological_operations/views.py')
-rw-r--r-- | archaeological_operations/views.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index 7b6a56597..270411bfd 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -540,7 +540,10 @@ def get_relation_modify(model, model_relation, formset_class, url_name, except model.DoesNotExist: raise Http404() if "_own_" in current_right: - if not item.is_own(request.user): + if not request.user.has_perm(current_right, item): + raise PermissionDenied() + elif current_right: + if not request.user.has_perm(current_right): raise PermissionDenied() relations = model_relation.objects.filter(left_record_id=pk).all() form_kwargs = {"left_record": item} |