Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13240715
D12778.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D12778.diff
View Options
diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -47,7 +47,7 @@
'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2',
'rsrc/css/application/conpherence/durable-column.css' => '2e68a92f',
'rsrc/css/application/conpherence/menu.css' => 'f389e048',
- 'rsrc/css/application/conpherence/message-pane.css' => '3150e2a2',
+ 'rsrc/css/application/conpherence/message-pane.css' => '0e75feef',
'rsrc/css/application/conpherence/notification.css' => 'd208f806',
'rsrc/css/application/conpherence/transaction.css' => '885433f0',
'rsrc/css/application/conpherence/update.css' => '1099a660',
@@ -514,7 +514,7 @@
'config-welcome-css' => '6abd79be',
'conpherence-durable-column-view' => '2e68a92f',
'conpherence-menu-css' => 'f389e048',
- 'conpherence-message-pane-css' => '3150e2a2',
+ 'conpherence-message-pane-css' => '0e75feef',
'conpherence-notification-css' => 'd208f806',
'conpherence-thread-manager' => '9e507b59',
'conpherence-transaction-css' => '885433f0',
diff --git a/src/applications/conpherence/controller/ConpherenceListController.php b/src/applications/conpherence/controller/ConpherenceListController.php
--- a/src/applications/conpherence/controller/ConpherenceListController.php
+++ b/src/applications/conpherence/controller/ConpherenceListController.php
@@ -25,6 +25,10 @@
return $mode;
}
+ public function shouldAllowPublic() {
+ return true;
+ }
+
public function handleRequest(AphrontRequest $request) {
$user = $request->getUser();
$title = pht('Conpherence');
diff --git a/src/applications/conpherence/controller/ConpherenceNewController.php b/src/applications/conpherence/controller/ConpherenceNewController.php
--- a/src/applications/conpherence/controller/ConpherenceNewController.php
+++ b/src/applications/conpherence/controller/ConpherenceNewController.php
@@ -42,9 +42,8 @@
}
}
} else {
- $uri = $this->getApplicationURI($conpherence->getID());
return id(new AphrontRedirectResponse())
- ->setURI($uri);
+ ->setURI('/'.$conpherence->getMonogram());
}
} else {
$participant_prefill = $request->getStr('participant');
diff --git a/src/applications/conpherence/controller/ConpherenceNewRoomController.php b/src/applications/conpherence/controller/ConpherenceNewRoomController.php
--- a/src/applications/conpherence/controller/ConpherenceNewRoomController.php
+++ b/src/applications/conpherence/controller/ConpherenceNewRoomController.php
@@ -36,9 +36,8 @@
->setActor($user)
->applyTransactions($conpherence, $xactions);
- $uri = $this->getApplicationURI($conpherence->getID());
return id(new AphrontRedirectResponse())
- ->setURI($uri);
+ ->setURI('/'.$conpherence->getMonogram());
} catch (PhabricatorApplicationTransactionValidationException $ex) {
$validation_exception = $ex;
diff --git a/src/applications/conpherence/controller/ConpherenceRoomListController.php b/src/applications/conpherence/controller/ConpherenceRoomListController.php
--- a/src/applications/conpherence/controller/ConpherenceRoomListController.php
+++ b/src/applications/conpherence/controller/ConpherenceRoomListController.php
@@ -2,6 +2,10 @@
final class ConpherenceRoomListController extends ConpherenceController {
+ public function shouldAllowPublic() {
+ return true;
+ }
+
public function handleRequest(AphrontRequest $request) {
$user = $request->getUser();
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
@@ -251,7 +251,7 @@
case 'redirect':
default:
return id(new AphrontRedirectResponse())
- ->setURI($this->getApplicationURI($conpherence->getID().'/'));
+ ->setURI('/'.$conpherence->getMonogram());
break;
}
}
diff --git a/src/applications/conpherence/controller/ConpherenceViewController.php b/src/applications/conpherence/controller/ConpherenceViewController.php
--- a/src/applications/conpherence/controller/ConpherenceViewController.php
+++ b/src/applications/conpherence/controller/ConpherenceViewController.php
@@ -5,6 +5,10 @@
const OLDER_FETCH_LIMIT = 5;
+ public function shouldAllowPublic() {
+ return true;
+ }
+
public function handleRequest(AphrontRequest $request) {
$user = $request->getUser();
@@ -138,7 +142,7 @@
$conpherence,
PhabricatorPolicyCapability::CAN_JOIN);
$participating = $conpherence->getParticipantIfExists($user->getPHID());
- if (!$can_join && !$participating) {
+ if (!$can_join && !$participating && $user->isLoggedIn()) {
return null;
}
$draft = PhabricatorDraft::newFromUserAndKey(
@@ -147,9 +151,20 @@
if ($participating) {
$action = ConpherenceUpdateActions::MESSAGE;
$button_text = pht('Send');
- } else {
+ } else if ($user->isLoggedIn()) {
$action = ConpherenceUpdateActions::JOIN_ROOM;
$button_text = pht('Join');
+ } else {
+ // user not logged in so give them a login button.
+ $login_href = id(new PhutilURI('/auth/start/'))
+ ->setQueryParam('next', '/'.$conpherence->getMonogram());
+ return id(new PHUIFormLayoutView())
+ ->addClass('login-to-participate')
+ ->appendChild(
+ id(new PHUIButtonView())
+ ->setTag('a')
+ ->setText(pht('Login to Participate'))
+ ->setHref((string)$login_href));
}
$update_uri = $this->getApplicationURI('update/'.$conpherence->getID().'/');
@@ -157,10 +172,10 @@
$form =
id(new AphrontFormView())
+ ->setUser($user)
->setAction($update_uri)
->addSigil('conpherence-pontificate')
->setWorkflow(true)
- ->setUser($user)
->addHiddenInput('action', $action)
->appendChild(
id(new PhabricatorRemarkupControl())
diff --git a/src/applications/conpherence/controller/ConpherenceWidgetController.php b/src/applications/conpherence/controller/ConpherenceWidgetController.php
--- a/src/applications/conpherence/controller/ConpherenceWidgetController.php
+++ b/src/applications/conpherence/controller/ConpherenceWidgetController.php
@@ -13,6 +13,10 @@
return $this->userPreferences;
}
+ public function shouldAllowPublic() {
+ return true;
+ }
+
public function handleRequest(AphrontRequest $request) {
$request = $this->getRequest();
$user = $request->getUser();
@@ -26,6 +30,9 @@
->withIDs(array($conpherence_id))
->needWidgetData(true)
->executeOne();
+ if (!$conpherence) {
+ return new Aphront404Response();
+ }
$this->setConpherence($conpherence);
$this->setUserPreferences($user->loadPreferences());
@@ -138,8 +145,11 @@
PhabricatorPolicyCapability::CAN_JOIN);
if ($can_join) {
$text = pht('Settings are available after joining the room.');
- } else {
+ } else if ($viewer->isLoggedIn()) {
$text = pht('Settings not applicable to rooms you can not join.');
+ } else {
+ $text = pht(
+ 'Settings are available after logging in and joining the room.');
}
return phutil_tag(
'div',
diff --git a/src/view/form/PHUIFormLayoutView.php b/src/view/form/PHUIFormLayoutView.php
--- a/src/view/form/PHUIFormLayoutView.php
+++ b/src/view/form/PHUIFormLayoutView.php
@@ -7,6 +7,7 @@
*/
final class PHUIFormLayoutView extends AphrontView {
+ private $classes = array();
private $fullWidth;
public function setFullWidth($width) {
@@ -14,6 +15,11 @@
return $this;
}
+ public function addClass($class) {
+ $this->classes[] = $class;
+ return $this;
+ }
+
public function appendInstructions($text) {
return $this->appendChild(
phutil_tag(
@@ -38,7 +44,8 @@
}
public function render() {
- $classes = array('phui-form-view');
+ $classes = $this->classes;
+ $classes[] = 'phui-form-view';
if ($this->fullWidth) {
$classes[] = 'phui-form-full-width';
diff --git a/webroot/rsrc/css/application/conpherence/message-pane.css b/webroot/rsrc/css/application/conpherence/message-pane.css
--- a/webroot/rsrc/css/application/conpherence/message-pane.css
+++ b/webroot/rsrc/css/application/conpherence/message-pane.css
@@ -113,6 +113,14 @@
right: 241px;
}
+.conpherence-message-pane .phui-form-view.login-to-participate {
+ height: 28px;
+}
+
+.conpherence-message-pane .login-to-participate a.button {
+ float: right;
+}
+
.conpherence-message-pane .aphront-form-control-submit button,
.conpherence-message-pane .aphront-form-control-submit a.button {
margin-top: 6px;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 23, 3:57 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6295191
Default Alt Text
D12778.diff (8 KB)
Attached To
Mode
D12778: Conpherence - allow for public rooms to really work
Attached
Detach File
Event Timeline
Log In to Comment