Merge "Hide remove rule if no rule inserted in FW policy"

This commit is contained in:
Jenkins 2015-05-25 08:08:36 +00:00 committed by Gerrit Code Review
commit e9b4ad259d

View File

@ -192,6 +192,11 @@ class RemoveRuleFromPolicyLink(policy.PolicyTargetMixin,
kwargs={'policy_id': policy.id})
return base_url
def allowed(self, request, policy):
if len(policy.rules) > 0:
return True
return False
class AddRouterToFirewallLink(policy.PolicyTargetMixin,
tables.LinkAction):