Page MenuHomePhabricator

Enable removal of users from chat rooms in Conpherence

Authored by exp10r3r on Feb 2 2016, 9:26 PM.
Referenced Files
Unknown Object (File)
Dec 17 2022, 9:54 PM
Unknown Object (File)
Dec 9 2022, 10:05 PM
Unknown Object (File)
Nov 23 2022, 7:24 PM
Unknown Object (File)
Nov 23 2022, 7:23 PM
Unknown Object (File)
Nov 23 2022, 7:23 PM
Unknown Object (File)
Nov 23 2022, 7:23 PM
Unknown Object (File)
Nov 18 2022, 7:55 AM
Unknown Object (File)
Nov 14 2022, 12:13 PM




Controller changes

The functionality for removal, was already in place.
There was an enforcement of two conditions:

  1. User must have Can Edit policy on the conpherence
  2. remove_person phid should be same as $user->getUserID (which I think is coming via the logged in session)

What I've done is just remove the second condition and let the first condition stay as is.

View updates

In the view, the previous logic was to display the a tag with fa-times icon only when userID from the participants array matched the userID of the logged in person.

I've changed this to -> Show that icon for all users.

I know this is wrong and would create problems, wherein, even users with View policy could see that icon, but since major validations have been taken care at the Controller level, this is just a cosmetic issue and with a little help, I could fix it too.

Test Plan

On removing another user on our installation

after_removal.png (372×1 px, 57 KB)

Diff Detail

rP Phabricator
Lint Passed
Tests Passed
Build Status
Buildable 10689
Build 13132: arc lint + arc unit

Event Timeline

exp10r3r retitled this revision from to Enable removal of users from chat rooms in Conpherence.
exp10r3r updated this object.
exp10r3r edited the test plan for this revision. (Show Details)
exp10r3r added reviewers: epriestley, chad.
exp10r3r added a project: Conpherence.
exp10r3r added a subscriber: exp10r3r.

Apologies for the blunder earlier. Failure to upload this via arc forced me to get the diff via git, which I previously screwed up.
This is my intended one.

Briefly, you'll need to:

exp10r3r edited edge metadata.

committed in a separate diff D15728