Browse Source
Merge pull request #115 from YunoHost-Apps/fix_logout_patch
Fix automatic logout from YunoHost when logging out from Nextcloud (#106)
pull/119/head
JimboJoe
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
11 additions and
9 deletions
-
scripts/upgrade
-
scripts/upgrade.d/upgrade.last.sh
-
sources/patches/.gitignore
-
sources/patches_last_version/app-00-add-logout_url-conf.patch
|
|
@ -175,9 +175,7 @@ do |
|
|
# If the current version has the same major version than the next one, |
|
|
# If the current version has the same major version than the next one, |
|
|
# then it's the last upgrade to do |
|
|
# then it's the last upgrade to do |
|
|
if [ "$major_version" -eq "$current_major_version" ]; then |
|
|
if [ "$major_version" -eq "$current_major_version" ]; then |
|
|
current_major_version=last |
|
|
|
|
|
# Patch nexcloud files only for the last upgrade. |
|
|
|
|
|
cp -a ../sources/patches_last_version ../sources/patches |
|
|
|
|
|
|
|
|
current_major_version=last |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
# Load the value for this version |
|
|
# Load the value for this version |
|
|
|
|
|
@ -5,3 +5,7 @@ next_version="13.0.2" |
|
|
|
|
|
|
|
|
# Nextcloud tarball checksum sha256 |
|
|
# Nextcloud tarball checksum sha256 |
|
|
nextcloud_source_sha256="7396f98a1a53a9f4b144f55360d87c89cb6ee899feef1cfbf29a736219f9c47d" |
|
|
nextcloud_source_sha256="7396f98a1a53a9f4b144f55360d87c89cb6ee899feef1cfbf29a736219f9c47d" |
|
|
|
|
|
|
|
|
|
|
|
# Patch nextcloud files only for the last version |
|
|
|
|
|
cp -a ../sources/patches_last_version/* ../sources/patches |
|
|
|
|
|
|
|
|
@ -1,14 +1,14 @@ |
|
|
--- a/core/Controller/LoginController.php
|
|
|
--- a/core/Controller/LoginController.php
|
|
|
+++ b/core/Controller/LoginController.php
|
|
|
+++ b/core/Controller/LoginController.php
|
|
|
@@ -100,7 +100,10 @@ class LoginController extends Controller {
|
|
|
|
|
|
|
|
|
@@ -119,7 +119,10 @@
|
|
|
} |
|
|
} |
|
|
$this->userSession->logout(); |
|
|
$this->userSession->logout(); |
|
|
|
|
|
|
|
|
- return new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- $response = new RedirectResponse($this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm'));
|
|
|
+ $redirectUrl = $this->config->getSystemValue('logout_url',
|
|
|
+ $redirectUrl = $this->config->getSystemValue('logout_url',
|
|
|
+ $this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')
|
|
|
+ $this->urlGenerator->linkToRouteAbsolute('core.login.showLoginForm')
|
|
|
+ );
|
|
|
+ );
|
|
|
+ return new RedirectResponse($redirectUrl);
|
|
|
|
|
|
|
|
|
+ $response = new RedirectResponse($redirectUrl);
|
|
|
|
|
|
$response->addHeader('Clear-Site-Data', '"cache", "cookies", "storage", "executionContexts"'); |
|
|
|
|
|
return $response; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
|