@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Calendar - make calendar publicly accessible

Summary: yay public policy. Ref T4830.

Test Plan: browsed about calendar from a logged out browser

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4830

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

+29
+4
src/applications/calendar/controller/PhabricatorCalendarBrowseController.php
··· 3 3 final class PhabricatorCalendarBrowseController 4 4 extends PhabricatorCalendarController { 5 5 6 + public function shouldAllowPublic() { 7 + return true; 8 + } 9 + 6 10 public function processRequest() { 7 11 $now = time(); 8 12 $request = $this->getRequest();
+4
src/applications/calendar/controller/PhabricatorCalendarEventListController.php
··· 5 5 6 6 private $queryKey; 7 7 8 + public function shouldAllowPublic() { 9 + return true; 10 + } 11 + 8 12 public function willProcessRequest(array $data) { 9 13 $this->queryKey = idx($data, 'queryKey'); 10 14 }
+4
src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
··· 5 5 6 6 private $id; 7 7 8 + public function shouldAllowPublic() { 9 + return true; 10 + } 11 + 8 12 public function willProcessRequest(array $data) { 9 13 $this->id = $data['id']; 10 14 }
+17
src/applications/calendar/controller/PhabricatorCalendarViewController.php
··· 3 3 final class PhabricatorCalendarViewController 4 4 extends PhabricatorCalendarController { 5 5 6 + public function shouldAllowPublic() { 7 + return true; 8 + } 9 + 6 10 public function processRequest() { 7 11 $user = $this->getRequest()->getUser(); 8 12 ··· 89 93 $view = id(new AphrontErrorView()) 90 94 ->setSeverity(AphrontErrorView::SEVERITY_NOTICE) 91 95 ->setTitle(pht('Successfully deleted your status.')); 96 + } else if (!$request->getUser()->isLoggedIn()) { 97 + $login_uri = id(new PhutilURI('/auth/start/')) 98 + ->setQueryParam('next', '/calendar/'); 99 + $view = id(new AphrontErrorView()) 100 + ->setSeverity(AphrontErrorView::SEVERITY_NOTICE) 101 + ->setTitle( 102 + pht( 103 + 'You are not logged in. %s to see your calendar events.', 104 + phutil_tag( 105 + 'a', 106 + array( 107 + 'href' => $login_uri), 108 + pht('Log in')))); 92 109 } 93 110 94 111 return $view;