From: Jan Szejko Date: Fri, 31 Mar 2017 12:00:40 +0000 (+0200) Subject: superuser can edit all docs X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/2babb45aa286a7f64a3580a060a234a60c3d4d5a?ds=inline;hp=0a9fde379ec7a998a64f0fb2d157fe8e94903869 superuser can edit all docs --- 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: