fix: Permission created before making device a control node is not getting active (#14537)

* chore: bump status-go

* fix: mitigate permissions stuck in pending on control node promotion

This PR fixes #14023

UI does NOT allow promoting to control node is no Owner token is present
This commit is contained in:
Godfrain Jacques 2024-05-10 08:57:06 -07:00 committed by GitHub
parent 523e0490fe
commit ac54a70c4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View File

@ -13,6 +13,7 @@ import utils 1.0
Control { Control {
id: root id: root
property bool isPromoteSelfToControlNodeEnabled: false
property bool isControlNode: true property bool isControlNode: true
property string communityName: "" property string communityName: ""
property string communityColor: "" property string communityColor: ""
@ -45,6 +46,7 @@ Control {
id: mainGrid id: mainGrid
columnSpacing: 16 columnSpacing: 16
rowSpacing: 16 rowSpacing: 16
visible: root.isPromoteSelfToControlNodeEnabled
StatusRoundIcon { StatusRoundIcon {
id: icon id: icon

View File

@ -58,6 +58,8 @@ StackLayout {
property string pubsubTopic property string pubsubTopic
property string pubsubTopicKey property string pubsubTopicKey
property bool isTokenDeployed: !!root.ownerToken && root.ownerToken.deployState === Constants.ContractTransactionStatus.Completed
// Community transfer ownership related props: // Community transfer ownership related props:
required property bool isPendingOwnershipRequest required property bool isPendingOwnershipRequest
signal finaliseOwnershipClicked signal finaliseOwnershipClicked
@ -198,9 +200,10 @@ StackLayout {
communityColor: root.color communityColor: root.color
isControlNode: root.isControlNode isControlNode: root.isControlNode
isPendingOwnershipRequest: root.isPendingOwnershipRequest isPendingOwnershipRequest: root.isPendingOwnershipRequest
isPromoteSelfToControlNodeEnabled: root.isControlNode || root.isTokenDeployed
onExportControlNodeClicked:{ onExportControlNodeClicked:{
if(!!root.ownerToken && root.ownerToken.deployState === Constants.ContractTransactionStatus.Completed) { if(root.isTokenDeployed) {
root.exportControlNodeClicked() root.exportControlNodeClicked()
} else { } else {
Global.openPopup(transferOwnershipAlertPopup, { mode: TransferOwnershipAlertPopup.Mode.MoveControlNode }) Global.openPopup(transferOwnershipAlertPopup, { mode: TransferOwnershipAlertPopup.Mode.MoveControlNode })
@ -208,8 +211,7 @@ StackLayout {
} }
onImportControlNodeClicked: root.importControlNodeClicked() onImportControlNodeClicked: root.importControlNodeClicked()
onFinaliseOwnershipTransferClicked: root.finaliseOwnershipClicked() onFinaliseOwnershipTransferClicked: root.finaliseOwnershipClicked()
//TODO update once the domain changes onLearnMoreClicked: Global.openLink(Constants.statusHelpLinkPrefix + "communities/about-the-control-node-in-status-communities")
onLearnMoreClicked: Global.openLink(Constants.statusHelpLinkPrefix + "status-communities/about-the-control-node-in-status-communities")
} }
} }

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 5f4aab3121a6ef2c0c6d25111500fd58c762b8fb Subproject commit d9170f043f0e038a0ce376c86fd813aa7646ad67