Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions lib/private/NavigationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,16 @@ private function init(bool $resolveClosures = true): void {
}

$logoutUrl = \OC_User::getLogoutUrl($this->urlGenerator);
// Logout
$this->add([
'type' => 'settings',
'id' => 'logout',
'order' => 99999,
'href' => $logoutUrl,
'name' => $l->t('Log out'),
'icon' => $this->urlGenerator->imagePath('core', 'actions/logout.svg'),
]);
if ($logoutUrl !== '') {
$this->add([
'type' => 'settings',
'id' => 'logout',
'order' => 99999,
'href' => $logoutUrl,
'name' => $l->t('Log out'),
'icon' => $this->urlGenerator->imagePath('core', 'actions/logout.svg'),
]);
}

if ($this->isSubadmin()) {
// User management
Expand Down
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_User.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public static function isIncognitoMode() {
* Returns the current logout URL valid for the currently logged-in user
*
* @param \OCP\IURLGenerator $urlGenerator
* @return non-empty-string
* @return string
*/
public static function getLogoutUrl(\OCP\IURLGenerator $urlGenerator) {
$backend = self::findFirstActiveUsedBackend();
Expand Down
6 changes: 5 additions & 1 deletion lib/public/Authentication/IApacheBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ public function isSessionActive();
/**
* Gets the current logout URL
*
* @return non-empty-string
* Can return an empty string when the backend has no logout URL to
* offer (e.g. Kerberos/SPNEGO where logging out client-side has no
* effect since the browser will just re-authenticate transparently).
*
* @return string
* @since 12.0.3
*/
public function getLogoutUrl();
Expand Down
Loading