Skip to content

Commit

Permalink
fix: mitigate permissions stuck in pending on control node promotion
Browse files Browse the repository at this point in the history
This PR fixes #14023

UI does NOT allow promoting to control node is no Owner token is present
  • Loading branch information
kounkou committed May 9, 2024
1 parent 9ca5fb7 commit 4883ad0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Control {
property string communityName: ""
property string communityColor: ""

property bool isOwnerTokenPresent

// Community transfer ownership related props:
required property bool isPendingOwnershipRequest

Expand Down Expand Up @@ -104,6 +106,8 @@ Control {
size: StatusBaseButton.Size.Small
text: d.primaryButtonText
onClicked: d.primaryButtonAction()
interactive: root.isOwnerTokenPresent
tooltip.text: root.isOwnerTokenPresent ? "" : qsTr("Owner token is needed")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ StackLayout {
communityColor: root.color
isControlNode: root.isControlNode
isPendingOwnershipRequest: root.isPendingOwnershipRequest
isOwnerTokenPresent: root.isControlNode || !!root.ownerToken && root.ownerToken.deployState === Constants.ContractTransactionStatus.Completed

onExportControlNodeClicked:{
if(!!root.ownerToken && root.ownerToken.deployState === Constants.ContractTransactionStatus.Completed) {
Expand All @@ -208,8 +209,7 @@ StackLayout {
}
onImportControlNodeClicked: root.importControlNodeClicked()
onFinaliseOwnershipTransferClicked: root.finaliseOwnershipClicked()
//TODO update once the domain changes
onLearnMoreClicked: Global.openLink(Constants.statusHelpLinkPrefix + "status-communities/about-the-control-node-in-status-communities")
onLearnMoreClicked: Global.openLink(Constants.statusHelpLinkPrefix + "communities/about-the-control-node-in-status-communities")
}
}

Expand Down

0 comments on commit 4883ad0

Please sign in to comment.