Page MenuHomePhabricator

Enable removal of users from chat rooms in Conpherence
AbandonedPublic

Authored by exp10r3r on Feb 2 2016, 9:26 PM.
Referenced Files
F14317547: D15168.id36845.diff
Wed, Dec 18, 8:12 AM
F14316494: D15168.id36621.diff
Wed, Dec 18, 7:17 AM
Unknown Object (File)
Sun, Dec 15, 12:10 AM
Unknown Object (File)
Fri, Dec 13, 6:08 PM
Unknown Object (File)
Fri, Dec 13, 4:02 AM
Unknown Object (File)
Wed, Dec 11, 2:53 AM
Unknown Object (File)
Sun, Dec 8, 11:48 AM
Unknown Object (File)
Sat, Dec 7, 6:35 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