Commit b3c8a40b authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added support for web mode detection

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12154 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e0caf6c3
......@@ -2454,6 +2454,16 @@ class Base( CopyContainer,
except AttributeError:
return None
security.declarePublic('isWebMode')
def isWebMode(self):
if self.getApplicableLayout() is None:
return False
if getattr(self.REQUEST, 'ignore_layout', None) is not None:
return False
if getattr(self.REQUEST, 'editable_mode', 0):
return False
return True
security.declareProtected(Permissions.ChangeLocalRoles,
'updateLocalRolesOnSecurityGroups')
def updateLocalRolesOnSecurityGroups(self, **kw):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment