Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14031158
D13560.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D13560.diff
View Options
diff --git a/src/applications/spaces/controller/PhabricatorSpacesNoAccessController.php b/src/applications/spaces/controller/PhabricatorSpacesNoAccessController.php
--- a/src/applications/spaces/controller/PhabricatorSpacesNoAccessController.php
+++ b/src/applications/spaces/controller/PhabricatorSpacesNoAccessController.php
@@ -4,17 +4,44 @@
extends PhabricatorSpacesController {
public function handleRequest(AphrontRequest $request) {
- return $this->newDialog()
+ $viewer = $this->getViewer();
+
+ $dialog = $this->newDialog()
->setTitle(pht('No Access to Spaces'))
- ->appendParagraph(
- pht(
- 'This install uses spaces to organize objects, but your account '.
- 'does not have access to any spaces.'))
- ->appendParagraph(
- pht(
- 'Ask someone to add you to a Space so you can view and create '.
- 'objects.'))
->addCancelButton('/', pht('Drift Aimlessly'));
+
+ if ($viewer->isLoggedIn()) {
+ $dialog
+ ->appendParagraph(
+ pht(
+ 'This install uses spaces to organize objects, but your account '.
+ 'does not have access to any spaces.'))
+ ->appendParagraph(
+ pht(
+ 'Ask someone to give you access to a space so you can view and '.
+ 'create objects.'));
+ } else {
+ // Tailor the message a bit for logged-out users.
+ $dialog
+ ->appendParagraph(
+ pht(
+ 'This install uses spaces to organize objects, but logged out '.
+ 'users do not have access to any spaces.'))
+ ->appendParagraph(
+ pht(
+ 'Log in, or ask someone to create a public space which logged '.
+ 'out users are permitted to access.'))
+ ->appendParagraph(
+ pht(
+ '(This error generally indicates that %s is enabled, but there '.
+ 'are no spaces with a "%s" view policy. These settings are '.
+ 'contradictory and imply a misconfiguration.)',
+ phutil_tag('tt', array(), 'policy.allow-public'),
+ pht('Public (No Login Required)')));
+ }
+
+
+ return $dialog;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 10, 9:31 AM (6 d, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6722216
Default Alt Text
D13560.diff (2 KB)
Attached To
Mode
D13560: Tailor the "No Access" message for logged-out users of Spaces
Attached
Detach File
Event Timeline
Log In to Comment