Merge "Hide remove rule if no rule inserted in FW policy"
This commit is contained in:
commit
e9b4ad259d
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user