Page MenuHomePhabricator

D9120.id21664.diff
No OneTemporary

D9120.id21664.diff

diff --git a/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php b/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php
@@ -3,6 +3,10 @@
final class PhabricatorCalendarBrowseController
extends PhabricatorCalendarController {
+ public function shouldAllowPublic() {
+ return true;
+ }
+
public function processRequest() {
$now = time();
$request = $this->getRequest();
diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventListController.php b/src/applications/calendar/controller/PhabricatorCalendarEventListController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarEventListController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarEventListController.php
@@ -5,6 +5,10 @@
private $queryKey;
+ public function shouldAllowPublic() {
+ return true;
+ }
+
public function willProcessRequest(array $data) {
$this->queryKey = idx($data, 'queryKey');
}
diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
@@ -5,6 +5,10 @@
private $id;
+ public function shouldAllowPublic() {
+ return true;
+ }
+
public function willProcessRequest(array $data) {
$this->id = $data['id'];
}
diff --git a/src/applications/calendar/controller/PhabricatorCalendarViewController.php b/src/applications/calendar/controller/PhabricatorCalendarViewController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarViewController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarViewController.php
@@ -3,6 +3,10 @@
final class PhabricatorCalendarViewController
extends PhabricatorCalendarController {
+ public function shouldAllowPublic() {
+ return true;
+ }
+
public function processRequest() {
$user = $this->getRequest()->getUser();
@@ -89,6 +93,19 @@
$view = id(new AphrontErrorView())
->setSeverity(AphrontErrorView::SEVERITY_NOTICE)
->setTitle(pht('Successfully deleted your status.'));
+ } else if (!$request->getUser()->isLoggedIn()) {
+ $login_uri = id(new PhutilURI('/auth/start/'))
+ ->setQueryParam('next', '/calendar/');
+ $view = id(new AphrontErrorView())
+ ->setSeverity(AphrontErrorView::SEVERITY_NOTICE)
+ ->setTitle(
+ pht(
+ 'You are not logged in. %s to see your calendar events.',
+ phutil_tag(
+ 'a',
+ array(
+ 'href' => $login_uri),
+ pht('Log in'))));
}
return $view;

File Metadata

Mime Type
text/plain
Expires
Mon, May 20, 7:37 AM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6275763
Default Alt Text
D9120.id21664.diff (2 KB)

Event Timeline