Logout leads to 404 if page permissions missing #1668

Closed
schneck opened this Issue Mar 22, 2013 · 7 comments

Comments

Projects
None yet
4 participants

schneck commented Mar 22, 2013

When clicking the Logout link in the toolbar, a 404 page appears if the current page is not accessible by anonymous users. It should lead to the login page, in this case.

Owner

czpython commented Mar 23, 2013

Hey schneck,

When you click on logout do you get redirected to www.yourdomain/accounts/login/?next=previous-page ?

schneck commented Mar 23, 2013

Hi,

no, I'm staying on the page where I was. Btw, I',m using 2.4beta, no idea if it is the same case for older versions.

Owner

czpython commented Mar 23, 2013

Hmm, I tried to reproduce this in 2.4 beta and get redirected to /accounts/login/?next=previous-page which is expected behavior in Django due to the value of LOGIN_URL. Just to make sure I got it right, you created a page, went into the admin and checked the login_required checkbox in "Advanced Settings", then went to the page live and clicked "Log out" on the toolbar ? I tested this in 2.3.5 and it does the same thing. Try setting LOGIN_URL

schneck commented Mar 23, 2013

I don't have access to the page currently, but AFAIK, I did not set "login_required", but only access permission to certain groups. Since anonymous users are not in this groups, it seems to be the reason that I get the 404 page. Can you reproduce it this way?

schneck commented Apr 8, 2013

I commited a patch to my fork, do you think this is okay?
schneck/django-cms@66639bc

Member

digi604 commented Jul 11, 2013

could you open a pull request for this?

digi604 added this to the 3.0 milestone Feb 10, 2014

digi604 self-assigned this Feb 10, 2014

Contributor

yakky commented Mar 1, 2014

Same as #2124

digi604 closed this in #2770 Mar 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment