Page MenuHomePhabricator

Enable removal of users from chat rooms in Conpherence
AbandonedPublic

Authored by exp10r3r on Feb 2 2016, 9:26 PM.
Referenced Files
F13961060: D15168.id36621.diff
Oct 15 2024, 2:57 AM
F13960487: D15168.id36621.diff
Oct 14 2024, 11:37 PM
Unknown Object (File)
Oct 13 2024, 8:40 AM
Unknown Object (File)
Oct 13 2024, 8:18 AM
Unknown Object (File)
Sep 30 2024, 5:03 PM
Unknown Object (File)
Sep 26 2024, 9:03 PM
Unknown Object (File)
Sep 22 2024, 6:16 PM
Unknown Object (File)
Sep 12 2024, 8:21 AM
Subscribers

Details

Summary

T9348

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

Repository
rP Phabricator
Branch
master
Lint
Lint Passed
Unit
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