fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0a9fde3
)
superuser can edit all docs
author
Jan Szejko
<janek37@gmail.com>
Fri, 31 Mar 2017 12:00:40 +0000
(14:00 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Fri, 31 Mar 2017 12:00:40 +0000
(14:00 +0200)
apps/catalogue/models/document.py
patch
|
blob
|
history
diff --git
a/apps/catalogue/models/document.py
b/apps/catalogue/models/document.py
index
21eb777
..
ef5a5cc
100755
(executable)
--- 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):
return metadata
def can_edit(self, user):
+ if user.is_superuser:
+ return True
if self.owner_user:
return self.owner_user == user
else:
if self.owner_user:
return self.owner_user == user
else: