@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.

Tailor the "No Access" message for logged-out users of Spaces

Summary: Fixes T8759.

Test Plan: {F593519}

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T8759

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

+36 -9
+36 -9
src/applications/spaces/controller/PhabricatorSpacesNoAccessController.php
··· 4 4 extends PhabricatorSpacesController { 5 5 6 6 public function handleRequest(AphrontRequest $request) { 7 - return $this->newDialog() 7 + $viewer = $this->getViewer(); 8 + 9 + $dialog = $this->newDialog() 8 10 ->setTitle(pht('No Access to Spaces')) 9 - ->appendParagraph( 10 - pht( 11 - 'This install uses spaces to organize objects, but your account '. 12 - 'does not have access to any spaces.')) 13 - ->appendParagraph( 14 - pht( 15 - 'Ask someone to add you to a Space so you can view and create '. 16 - 'objects.')) 17 11 ->addCancelButton('/', pht('Drift Aimlessly')); 12 + 13 + if ($viewer->isLoggedIn()) { 14 + $dialog 15 + ->appendParagraph( 16 + pht( 17 + 'This install uses spaces to organize objects, but your account '. 18 + 'does not have access to any spaces.')) 19 + ->appendParagraph( 20 + pht( 21 + 'Ask someone to give you access to a space so you can view and '. 22 + 'create objects.')); 23 + } else { 24 + // Tailor the message a bit for logged-out users. 25 + $dialog 26 + ->appendParagraph( 27 + pht( 28 + 'This install uses spaces to organize objects, but logged out '. 29 + 'users do not have access to any spaces.')) 30 + ->appendParagraph( 31 + pht( 32 + 'Log in, or ask someone to create a public space which logged '. 33 + 'out users are permitted to access.')) 34 + ->appendParagraph( 35 + pht( 36 + '(This error generally indicates that %s is enabled, but there '. 37 + 'are no spaces with a "%s" view policy. These settings are '. 38 + 'contradictory and imply a misconfiguration.)', 39 + phutil_tag('tt', array(), 'policy.allow-public'), 40 + pht('Public (No Login Required)'))); 41 + } 42 + 43 + 44 + return $dialog; 18 45 } 19 46 20 47 }