diff options
author | Simon Eisenmann <simon@struktur.de> | 2016-09-13 12:15:30 +0200 |
---|---|---|
committer | Simon Eisenmann <simon@struktur.de> | 2016-09-13 12:32:17 +0200 |
commit | 1a240a23e59a2ee56fa00e590953239649225201 (patch) | |
tree | a4801dafc636151a9aaee122f1c966148bd87732 /core/js | |
parent | 0543661064b00c27c2e9a1780acf34c8a364f6ce (diff) | |
download | nextcloud-server-1a240a23e59a2ee56fa00e590953239649225201.tar.gz nextcloud-server-1a240a23e59a2ee56fa00e590953239649225201.zip |
Pass redirect_url through setup form
When accessing a 'not set up' Nextcloud with a redirect_url parameter
the parameter will is added to the setup POST request, resulting in the
requested redirect after setup is complete.
This is required in scenarios where Nextcloud is used as authorization
provider like on the Spreedbox to allow redirection to the required page
when normally a login form would be shown but the setup form is shown
instead.
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/setup.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/js/setup.js b/core/js/setup.js index 1aad7663223..9190310d5ae 100644 --- a/core/js/setup.js +++ b/core/js/setup.js @@ -79,6 +79,17 @@ $(document).ready(function() { form.append(input); } + // Add redirect_url + var redirectURL = getURLParameter('redirect_url'); + if (redirectURL) { + var redirectURLInput = $('<input type="hidden">'); + redirectURLInput.attr({ + name: 'redirect_url', + value: redirectURL + }); + form.append(redirectURLInput); + } + // Submit the form form.appendTo(document.body); form.submit(); |