Page MenuHomePhabricator

[lib] Fix universal community permissions to prevent input bar and join chat button from appearing at the same time
ClosedPublic

Authored by rohan on Oct 13 2023, 4:40 PM.
Tags
None
Referenced Files
F2152191: D9493.id.diff
Sun, Jun 30, 2:26 PM
Unknown Object (File)
Fri, Jun 28, 5:09 AM
Unknown Object (File)
Thu, Jun 27, 11:55 PM
Unknown Object (File)
Thu, Jun 27, 6:16 PM
Unknown Object (File)
Thu, Jun 27, 5:02 PM
Unknown Object (File)
Thu, Jun 27, 2:48 AM
Unknown Object (File)
Wed, Jun 26, 6:08 PM
Unknown Object (File)
Wed, Jun 26, 6:00 PM
Subscribers

Details

Summary

Currently, there is a problem with the permissions we guarantee to all communities (descendant_open_voiced). This is actually not necessary, and @ashoat's suggestion fixed it:

We should probably change this so that membership in the individual chat confers voiced. I think we can simply remove descendant_open_voiced from the community, and just leave it as a simple voiced. The permissions for each individual chat should confer voiced to members.

This won't fix the issue for Admins, since their permissions get set in thread-permissions. That'll come in the next diff

I should add a migration for this, it'll come as a follow up

Resolves https://linear.app/comm/issue/ENG-5180/join-chat-mode-showing-chat-input-field

Test Plan

Verified in an existing community (i.e. with the incorrect permission), the join chat button and the input field appears. In my new community created after removing this permission from being included, it's either one or the other.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rohan requested review of this revision.Oct 13 2023, 4:58 PM
This revision is now accepted and ready to land.Oct 16 2023, 1:56 PM

Introduce permissionsToRemoveInMigration to use in the stack