Skip to content

Commit

Permalink
fix(permissions): fix view and post permission overwritten by view perm
Browse files Browse the repository at this point in the history
Fixes #14209
  • Loading branch information
jrainville committed Mar 29, 2024
1 parent b191caa commit 5c298d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/app/modules/main/chat_section/module.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion vendor/status-go

0 comments on commit 5c298d6

Please sign in to comment.