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

Logging out with ckan on non-root URL redirects to the wrong URL. #1025

Merged
merged 7 commits into from Jul 1, 2013

Conversation

tobes
Copy link
Contributor

@tobes tobes commented Jun 19, 2013

When running ckan on a non-root URL, clicking on logout ends up in a redirect which does not take the api_url into consideration.

@ghost ghost assigned nigelbabu Jun 19, 2013
@tobes
Copy link
Contributor

tobes commented Jun 19, 2013

loging out should not care about api_url as that is for api calls and nothing to do with where ckan is

@tobes
Copy link
Contributor

tobes commented Jun 26, 2013

@kindly this is now assigned to you as @nigelbabu nigel was not confident about reviewing it. Let me know if you want and I can do #1039 as part of this pr

@kindly
Copy link
Contributor

kindly commented Jun 26, 2013

@tobes yes could you do #1039 as part of this one and I can review

@tobes
Copy link
Contributor

tobes commented Jun 26, 2013

@kindly I've added the change - is this good enough?

@kindly
Copy link
Contributor

kindly commented Jun 26, 2013

@ tobes the problem is that any came_from we generate is always absolute so this will never work.
I think we generate the came_from here
https://github.com/okfn/ckan/blob/master/ckan/lib/repoze_patch.py#L154

@tobes
Copy link
Contributor

tobes commented Jun 26, 2013

But I think we always add the came_from ourselves - I can add logic for //ckan_domain/... if you want but in testing all was good - let me know

@kindly
Copy link
Contributor

kindly commented Jun 26, 2013

It my test going to:
http://0.0.0.0:5000/organization/new
when logged out redirects to:
http://0.0.0.0:5000/user/login?came_from=http://0.0.0.0:5000/organization/new

So this seems like it is an issue.

@tobes
Copy link
Contributor

tobes commented Jun 26, 2013

Is this better :) works for me

@tobes
Copy link
Contributor

tobes commented Jun 28, 2013

@kindly you need anything from me for this?

@kindly kindly merged commit 30dd328 into master Jul 1, 2013
@vitorbaptista vitorbaptista deleted the 1025-user-login-fixes branch October 17, 2013 00:07
amercader pushed a commit that referenced this pull request Nov 5, 2013
Conflicts:

	ckan/controllers/user.py
	ckan/lib/repoze_patch.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants