Skip to content

Commit

Permalink
fix: superuser permissions on page
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Jun 8, 2021
1 parent cb9f457 commit 860ae46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_requirements(fname='requirements.txt'):

setup(
name="unicms",
version='0.19.0',
version='0.19.1',
description="uniCMS is a Django Web Content Management System",
long_description=README,
long_description_content_type='text/markdown',
Expand Down
3 changes: 3 additions & 0 deletions src/cms/pages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ def translate_as(self, lang):

def is_localizable_by(self, user=None):
if not user: return False
if user.is_superuser: return True
# check if user has EditorialBoard editor permissions on object
# and check for locks on webpath
webpath = self.webpath
Expand All @@ -293,6 +294,7 @@ def is_localizable_by(self, user=None):

def is_editable_by(self, user=None):
if not user: return False
if user.is_superuser: return True
# check if user has EditorialBoard editor permissions on object
# and check for locks on webpath
webpath = self.webpath
Expand All @@ -303,6 +305,7 @@ def is_editable_by(self, user=None):

def is_publicable_by(self, user=None):
if not user: return False
if user.is_superuser: return True
# check if user has EditorialBoard editor permissions on object
# and check for locks on webpath
webpath = self.webpath
Expand Down

0 comments on commit 860ae46

Please sign in to comment.