Page MenuHomePhabricator

D15168.id36621.diff
No OneTemporary

D15168.id36621.diff

diff --git a/src/applications/conpherence/controller/ConpherenceUpdateController.php b/src/applications/conpherence/controller/ConpherenceUpdateController.php
--- a/src/applications/conpherence/controller/ConpherenceUpdateController.php
+++ b/src/applications/conpherence/controller/ConpherenceUpdateController.php
@@ -16,9 +16,11 @@
switch ($action) {
case ConpherenceUpdateActions::REMOVE_PERSON:
$person_phid = $request->getStr('remove_person');
- if ($person_phid != $user->getPHID()) {
+ // This condition and one below enforces the remove_person to be same as the acting_person
+ // By default all we need is to check whether the acting_person can edit the room or not.
+ // if ($person_phid != $user->getPHID()) {
$needed_capabilities[] = PhabricatorPolicyCapability::CAN_EDIT;
- }
+ // }
break;
case ConpherenceUpdateActions::ADD_PERSON:
case ConpherenceUpdateActions::METADATA:
@@ -111,7 +113,10 @@
break;
}
$person_phid = $request->getStr('remove_person');
- if ($person_phid && $person_phid == $user->getPHID()) {
+ // Even though we are no longer checking for the user to be himself,
+ // it is still necessary for the phid of the user to be specified
+ if ($person_phid) {
+ // if ($person_phid && $person_phid == $user->getPHID()) {
$xactions[] = id(new ConpherenceTransaction())
->setTransactionType(
ConpherenceTransaction::TYPE_PARTICIPANTS)
diff --git a/src/applications/conpherence/view/ConpherencePeopleWidgetView.php b/src/applications/conpherence/view/ConpherencePeopleWidgetView.php
--- a/src/applications/conpherence/view/ConpherencePeopleWidgetView.php
+++ b/src/applications/conpherence/view/ConpherencePeopleWidgetView.php
@@ -21,7 +21,8 @@
foreach ($handles as $handle) {
$user_phid = $handle->getPHID();
$remove_html = '';
- if ($user_phid == $user->getPHID()) {
+ // Add the 'remove' icon next to all users. The actual validation will be handled in ConpherenceUpdateController instead.
+ // if ($user_phid == $user->getPHID()) {
$icon = id(new PHUIIconView())
->setIcon('fa-times lightbluetext');
$remove_html = javelin_tag(
@@ -35,7 +36,7 @@
),
),
$icon);
- }
+ // }
$body[] = phutil_tag(
'div',
array(

File Metadata

Mime Type
text/plain
Expires
Oct 15 2024, 11:37 PM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714914
Default Alt Text
D15168.id36621.diff (2 KB)

Event Timeline