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

Add setting to use same session for front end and admin #1085

Closed
maxfrigge opened this issue Sep 30, 2016 · 7 comments
Closed

Add setting to use same session for front end and admin #1085

maxfrigge opened this issue Sep 30, 2016 · 7 comments

Comments

@maxfrigge
Copy link
Contributor

Currently the session is split up in front end and admin. While this might be desired in some cases, there are also other cases where you want a shared session - e.g. when displaying an admin bar with links to edit or create a new page, currently logged in user name etc.

I propose that there should be a session setting to enable/disable sharing the session (disabled by default).

I can create a PR if you agree on this.

@rhukster
Copy link
Member

A PR would be considered as long as the default state was 'split' sessions.

@maxfrigge
Copy link
Contributor Author

I have prepared a PR for this feature, but there are still few things to take care of.

Session related translations are stored in the admin plugin - I will create a PR for that once everything else is settled. I am also struggling with a proper naming and description.

This is what I am currently using (the setting is system.session.split_admin)
split_session

Then there is a small glitch when changing this setting. Upon saving, your current session will become invalid, which results in a logout (redirect to login) along with an error message "invalid security token". Is this ok or should there be a process to migrate from on session name to the other?

@w00fz
Copy link
Member

w00fz commented Oct 6, 2016

I'm not sure if that's ok but if it is inevitable, I think we should at least have it explained in the description (tooltip). "By changing this field, your session will become invalid and you will be required to login again." ... something along those lines

@maxfrigge
Copy link
Contributor Author

I wouldn't say inevitable.. it shouldn't be too hard to migrate the session to another namespace. I haven't had a closer look at possible pitfalls yet though - is there anyone around who has more experience with the admin session?

@flaviocopes
Copy link
Contributor

I think having a proper description with this side-effect explained is fine. I guess that when you enable this setting, admin will use the site session, so that's inevitable unless the opposite happens (site uses the admin session), which I don't know if it's doable / nicer.

@rhukster
Copy link
Member

done.

@CherryDT
Copy link

Note that this value is not documented in the docs. (It is shown in the example, but not explained.)

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

No branches or pull requests

5 participants