fix(permissions): fix view and post permission overwritten by view perm

Fixes #14209
This commit is contained in:
Jonathan Rainville 2024-03-29 14:00:14 -04:00
parent 3a4ebd52fc
commit 8f5efc6cb0
2 changed files with 4 additions and 3 deletions

View File

@ -390,7 +390,9 @@ proc reevaluateRequiresTokenPermissionToJoin(self: Module) =
let community = self.controller.getMyCommunity()
var joinPermissionsChanged = false
for _, tokenPermission in community.tokenPermissions:
if tokenPermission.`type` == TokenPermissionType.BecomeMember or tokenPermission.`type` == TokenPermissionType.BecomeAdmin or tokenPermission.`type` == TokenPermissionType.BecomeTokenMaster:
if tokenPermission.`type` == TokenPermissionType.BecomeMember or
tokenPermission.`type` == TokenPermissionType.BecomeAdmin or
tokenPermission.`type` == TokenPermissionType.BecomeTokenMaster:
joinPermissionsChanged = true
break
self.view.setRequiresTokenPermissionToJoin(joinPermissionsChanged)
@ -413,7 +415,6 @@ method initListOfMyContacts*(self: Module, pubKeys: string) =
method clearListOfMyContacts*(self: Module) =
self.view.listOfMyContacts().clear()
method load*(self: Module) =
self.controller.init()
self.view.load()

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 107d7a98226a4d536ff057497544abcf0baf5f5c
Subproject commit 6c82a6c2be7ebed93bcae3b9cf5053da3820de50