Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optional redirect in ui when receiving a 401 from the api #955

Merged
merged 4 commits into from Apr 11, 2016

Conversation

@ssalinas
Copy link
Member

@ssalinas ssalinas commented Mar 17, 2016

based on brunch -> gulp changes to avoid merge conflicts, last commit is the relevant one

@@ -77,6 +77,9 @@ public static RootUrlMode parse(String value) {
@NotEmpty
private String timestampWithSecondsFormat = "lll:ss";

@JsonProperty
private String redirectOnUnauthorizedUrl = "";

This comment has been minimized.

@tpetr

tpetr Mar 17, 2016
Member

we should use Optional<String> instead

@@ -107,6 +107,8 @@ class Application
if jqxhr.status is 502
Messenger().info
message: "Singularity is deploying, your requests cannot be handled. Things should resolve in a few seconds so just hang tight!"
else if jqxhr.status is 401 and config.redirectOnUnauthorizedURL
window.location.href = config.redirectOnUnauthorizedURL

This comment has been minimized.

@tpetr

tpetr Mar 17, 2016
Member

we should have some sort of support for redirecting back to the original page once the user has logged in... something along the lines of .replace('${URL}', window.location.href) could work

@ssalinas ssalinas force-pushed the unauthorized_redirect branch from a118693 to 1da714b Mar 18, 2016
@ssalinas ssalinas force-pushed the unauthorized_redirect branch from 103f0a4 to d2ee3e8 Mar 18, 2016
@ssalinas ssalinas modified the milestone: 0.4.12 Mar 18, 2016
@ssalinas ssalinas modified the milestones: 0.5.0, 0.6.0 Apr 5, 2016
@tpetr tpetr merged commit 49d323e into master Apr 11, 2016
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build failed
Details
@tpetr tpetr removed hs_qa labels Apr 11, 2016
@ssalinas ssalinas deleted the unauthorized_redirect branch Sep 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.