Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / spaces / controller / PhabricatorSpacesNoAccessController.php
blob57ce7d80db846a99c596f013a378c9466a48719f
1 <?php
3 final class PhabricatorSpacesNoAccessController
4 extends PhabricatorSpacesController {
6 public function handleRequest(AphrontRequest $request) {
7 $viewer = $this->getViewer();
9 $dialog = $this->newDialog()
10 ->setTitle(pht('No Access to Spaces'))
11 ->addCancelButton('/', pht('Drift Aimlessly'));
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)')));
44 return $dialog;