HomePhabricator

Fix join and remove policy checks for Conpherence

Description

Fix join and remove policy checks for Conpherence

Summary:
I think these got munged when I removed CAN_JOIN.

  • If you can view the room, you can join it.
  • If you can view the room, you can add others to it. This rule adjustment was removed, see discussion on the revision.
  • If you are a participant in the room, you can remove yourself.
  • If you can edit a room, you can remove anyone.

Test Plan:
Normal feature set:

  • Create a new room that only I can edit, viewable by all users.
  • Leave room (bye k thx)
  • Create another room, myself only
  • Join room from second account
  • See ability to only remove myself
  • Remove myself
  • Rejoin
  • Add third account
  • Log into first account
  • Boot off randos
  • Test joining by green button, message, and by + sign.

Policy consistency:

  • As a user who can not edit the room, tried to add other members. Received policy exception. The + button is currently visible and enabled for all users (even users who have not joined the room) but this is pre-existing.

Reviewers: chad

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17696

Details

Provenance
Chad Little <chad@phacility.com>Authored on Apr 15 2017, 1:08 PM
epriestleyCommitted on Apr 15 2017, 1:16 PM
epriestleyPushed on Apr 15 2017, 1:19 PM
Differential Revision
D17696: Fix join and remove policy checks for Conpherence
Parents
rPf0fbf7a7d32e: Sort "closed" results (like disabled users) to the bottom of typeaheads, but…
Branches
Unknown
Tags
Unknown
Build Status
Buildable 16497
Build 21972: Run Core Tests