Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14053493
D17151.id41247.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
D17151.id41247.diff
View Options
diff --git a/src/applications/diffusion/view/DiffusionCloneURIView.php b/src/applications/diffusion/view/DiffusionCloneURIView.php
--- a/src/applications/diffusion/view/DiffusionCloneURIView.php
+++ b/src/applications/diffusion/view/DiffusionCloneURIView.php
@@ -35,6 +35,8 @@
}
public function render() {
+ $viewer = $this->getViewer();
+
require_celerity_resource('diffusion-icons-css');
Javelin::initBehavior('select-content');
@@ -87,12 +89,18 @@
case PhabricatorRepositoryURI::IO_READWRITE:
switch ($uri->getBuiltinProtocol()) {
case PhabricatorRepositoryURI::BUILTIN_PROTOCOL_SSH:
- $auth_uri = '/settings/panel/ssh/';
+ $auth_uri = id(new PhabricatorSSHKeysSettingsPanel())
+ ->setViewer($viewer)
+ ->setUser($viewer)
+ ->getPanelURI();
$auth_tip = pht('Manage SSH Keys');
$auth_disabled = false;
break;
default:
- $auth_uri = '/settings/panel/vcspassword';
+ $auth_uri = id(new DiffusionSetPasswordSettingsPanel())
+ ->setViewer($viewer)
+ ->setUser($viewer)
+ ->getPanelURI();
$auth_tip = pht('Manage Password');
$auth_disabled = false;
break;
diff --git a/src/applications/settings/controller/PhabricatorSettingsMainController.php b/src/applications/settings/controller/PhabricatorSettingsMainController.php
--- a/src/applications/settings/controller/PhabricatorSettingsMainController.php
+++ b/src/applications/settings/controller/PhabricatorSettingsMainController.php
@@ -32,7 +32,7 @@
// Redirect "/panel/XYZ/" to the viewer's personal settings panel. This
// was the primary URI before global settings were introduced and allows
- // generation of viewer-agnostic URIs for email.
+ // generation of viewer-agnostic URIs for email and logged-out users.
$panel = $request->getURIData('panel');
if ($panel) {
$panel = phutil_escape_uri($panel);
diff --git a/src/applications/settings/panel/PhabricatorSettingsPanel.php b/src/applications/settings/panel/PhabricatorSettingsPanel.php
--- a/src/applications/settings/panel/PhabricatorSettingsPanel.php
+++ b/src/applications/settings/panel/PhabricatorSettingsPanel.php
@@ -229,8 +229,15 @@
$user = $this->getUser();
if ($user) {
- $username = $user->getUsername();
- return "/settings/user/{$username}/page/{$key}/{$path}";
+ if ($user->isLoggedIn()) {
+ $username = $user->getUsername();
+ return "/settings/user/{$username}/page/{$key}/{$path}";
+ } else {
+ // For logged-out users, we can't put their username in the URI. This
+ // page will prompt them to login, then redirect them to the correct
+ // location.
+ return "/settings/panel/{$key}/";
+ }
} else {
$builtin = $this->getPreferences()->getBuiltinKey();
return "/settings/builtin/{$builtin}/page/{$key}/{$path}";
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 4:39 PM (2 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6725684
Default Alt Text
D17151.id41247.diff (2 KB)
Attached To
Mode
D17151: Correct "Manage Password" link in Quickling in Diffusion
Attached
Detach File
Event Timeline
Log In to Comment