Merge "Fix "Set as Active" button's display for replicas"
This commit is contained in:
commit
fb9cd73dde
|
@ -64,7 +64,8 @@ class SetReplicaAsActive(tables.LinkAction):
|
|||
policy_rules = (("share_replica", "share_replica:promote"),)
|
||||
|
||||
def allowed(self, request, replica=None):
|
||||
return replica.replica_state == "in_sync"
|
||||
return (replica.status == "available" and
|
||||
replica.replica_state == "in_sync")
|
||||
|
||||
def get_policy_target(self, request, datum=None):
|
||||
return {"project_id": getattr(datum, "project_id", None)}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Visibility of Set as Active button for replicas in transitional states
|
||||
such as Deleting and Replication Change is now fixed.
|
Loading…
Reference in New Issue