Commit a4e8225d authored by wenjie.zheng's avatar wenjie.zheng

Variable.py: fix variable name info_guard.

parent b97e694b
......@@ -50,7 +50,6 @@ class Variable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
for_status = 1
default_value = ''
default_expr = None # Overrides default_value if set
info_guard = None
update_always = 1
default_reference = ''
# Declarative security
......@@ -76,7 +75,7 @@ class Variable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
def getInfoGuardSummary(self):
res = None
if self.getGuard() is not None:
res = self.guard.getSummary()
res = self.info_guard.getSummary()
return res
def getInfoGuard(self):
......@@ -84,20 +83,20 @@ class Variable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
self.getPermissionList() is None and\
self.getGroupList() is None and\
self.getExpression() is None and\
self.guard is None:
self.info_guard is None:
return None
else:
self.generateGuard()
return self.guard
return self.info_guard
def generateInfoGuard(self):
if self.guard is None:
self.guard = Guard().__of__(self)
if self.info_guard is None:
self.info_guard = Guard().__of__(self)
if self.getRoleList() is not None:
self.guard.roles = self.getRoleList()
self.info_guard.roles = self.getRoleList()
if self.getPermissionList() is not None:
self.guard.permissions = self.getPermissionList()
self.info_guard.permissions = self.getPermissionList()
if self.getGroupList() is not None:
self.guard.groups = self.getGroupList()
self.info_guard.groups = self.getGroupList()
if self.getExpression() is not None:
self.guard.expr = Expression(self.getExpression())
\ No newline at end of file
self.info_guard.expr = Expression(self.getExpression())
\ No newline at end of file
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