Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13960487
D15168.id36621.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D15168.id36621.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D15168: Enable removal of users from chat rooms in Conpherence
Attached
Detach File
Event Timeline
Log In to Comment