From 2babb45aa286a7f64a3580a060a234a60c3d4d5a Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Fri, 31 Mar 2017 14:00:40 +0200 Subject: [PATCH 1/1] superuser can edit all docs --- apps/catalogue/models/document.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/catalogue/models/document.py b/apps/catalogue/models/document.py index 21eb7774..ef5a5ccf 100755 --- a/apps/catalogue/models/document.py +++ b/apps/catalogue/models/document.py @@ -73,6 +73,8 @@ class Document(Ref): return metadata def can_edit(self, user): + if user.is_superuser: + return True if self.owner_user: return self.owner_user == user else: -- 2.20.1