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