Page MenuHomePhabricator

[lib] Fix the join chat / input field issue for Admins
AbandonedPublic

Authored by rohan on Oct 13 2023, 5:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 30, 6:48 AM
Unknown Object (File)
Wed, Jun 26, 7:10 PM
Unknown Object (File)
Wed, Jun 26, 11:19 AM
Unknown Object (File)
Tue, Jun 25, 11:34 AM
Unknown Object (File)
May 25 2024, 3:18 PM
Unknown Object (File)
May 5 2024, 7:32 PM
Unknown Object (File)
May 5 2024, 7:30 PM
Unknown Object (File)
May 5 2024, 6:57 PM
Subscribers

Details

Reviewers
ashoat
atul
ginsu
Summary

While the previous fix in the stack helped for custom roles / roles that will be edited, the permissions for Admins is set in thread-permissions.js. This diff addresses the change that will be needed to fix permissions for Admins. Essentially, we remove the descendant_voiced permission from Admins so they need to click the 'Join chat' button first in order to 1) 'become a member' and 2) send messages. Before this change, an Admin would see both 'Join chat' and also the chat input bar.

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

Depends on D9493

Going to add @ashoat as blocking since I think he has the most permissions context and also since this change will affect his role the most (a migration will be required to modify the existing role, but this change should take affect for newly created communities)

Test Plan

Confirmed that for Admins exclusively (tested other roles in the previous diff):

  • Before this change, Admins could see 'Join chat' but also type in the chat bar
  • After this change, Admins will see only one or the other

Also fixed up the unit tests to match this behavior and ran yarn workspace lib test

Diff Detail

Repository
rCOMM Comm
Branch
ENG-5180
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

rohan requested review of this revision.Oct 13 2023, 5:34 PM
ashoat requested changes to this revision.Oct 16 2023, 1:56 PM

Sorry, I should have clarified earlier... I think it's actually okay for admins to have this permission. I just wanted to make sure members didn't have it!

Think we can abandon this one, but let me know if I'm missing something.

This revision now requires changes to proceed.Oct 16 2023, 1:56 PM