@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<?php
2
3final class PhabricatorSpacesNoAccessController
4 extends PhabricatorSpacesController {
5
6 public function handleRequest(AphrontRequest $request) {
7 $viewer = $this->getViewer();
8
9 $dialog = $this->newDialog()
10 ->setTitle(pht('No Access to Spaces'))
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;
45 }
46
47}