Page MenuHomePhabricator

Enable removal of users from chat rooms in Conpherence
AbandonedPublic

Authored by exp10r3r on Feb 2 2016, 9:26 PM.

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

Diff Detail

Repository
rP Phabricator
Branch
master
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 10689
Build 13132: arc lint + arc unit

Event Timeline

exp10r3r updated this revision to Diff 36620.Feb 2 2016, 9:26 PM
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.
exp10r3r edited edge metadata.
exp10r3r set the repository for this revision to rP Phabricator.
exp10r3r updated this revision to Diff 36621.Feb 2 2016, 9:32 PM

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.

exp10r3r updated this object.Feb 2 2016, 9:34 PM
chad edited edge metadata.Feb 2 2016, 9:48 PM

Briefly, you'll need to:

exp10r3r edited the test plan for this revision. (Show Details)Feb 14 2016, 6:28 AM
exp10r3r edited edge metadata.
exp10r3r updated this revision to Diff 36845.Feb 14 2016, 6:38 AM

Lint + Units

exp10r3r abandoned this revision.Apr 16 2016, 4:11 AM

committed in a separate diff D15728