fix(descktop@community): show create/update/delete permissions toast notification for priviledged members only when it is approved by the control node (#13166)
This commit is contained in:
parent
9f2443f5e6
commit
5392da5361
|
@ -778,7 +778,8 @@ method onCommunityTokenPermissionCreated*(self: Module, communityId: string, tok
|
|||
|
||||
self.view.tokenPermissionsModel.addItem(tokenPermissionItem)
|
||||
self.reevaluateRequiresTokenPermissionToJoin()
|
||||
singletonInstance.globalEvents.showCommunityTokenPermissionCreatedNotification(communityId, "Community permission created", "A token permission has been added")
|
||||
if tokenPermission.state == TokenPermissionState.Approved:
|
||||
singletonInstance.globalEvents.showCommunityTokenPermissionCreatedNotification(communityId, "Community permission created", "A token permission has been added")
|
||||
|
||||
proc updateTokenPermissionModel*(self: Module, permissions: Table[string, CheckPermissionsResultDto], community: CommunityDto) =
|
||||
for id, criteriaResult in permissions:
|
||||
|
@ -863,7 +864,8 @@ method onCommunityTokenPermissionUpdated*(self: Module, communityId: string, tok
|
|||
self.view.tokenPermissionsModel.updateItem(tokenPermission.id, tokenPermissionItem)
|
||||
self.reevaluateRequiresTokenPermissionToJoin()
|
||||
|
||||
singletonInstance.globalEvents.showCommunityTokenPermissionUpdatedNotification(communityId, "Community permission updated", "A token permission has been updated")
|
||||
if tokenPermission.state == TokenPermissionState.Approved:
|
||||
singletonInstance.globalEvents.showCommunityTokenPermissionUpdatedNotification(communityId, "Community permission updated", "A token permission has been updated")
|
||||
|
||||
method onCommunityTokenPermissionCreationFailed*(self: Module, communityId: string) =
|
||||
singletonInstance.globalEvents.showCommunityTokenPermissionCreationFailedNotification(communityId, "Failed to create community permission", "Something went wrong")
|
||||
|
|
Loading…
Reference in New Issue