-
Notifications
You must be signed in to change notification settings - Fork 7
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
UX/UI fixes #11
UX/UI fixes #11
Conversation
cephalopod/factory.py
Outdated
@@ -42,7 +42,6 @@ def make_app(): | |||
'SQLALCHEMY_TRACK_MODIFICATIONS': False, | |||
'MULTIPASS_LOGIN_SELECTOR_TEMPLATE': 'login_selector.html', | |||
'MULTIPASS_LOGIN_FORM_TEMPLATE': 'login_form.html', | |||
'MULTIPASS_SUCCESS_ENDPOINT': 'auth.index' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should stay. see the logic in multipass to get the next url:
try:
return session.pop('_multipass_next_url')
except KeyError:
return url_for(current_app.config['MULTIPASS_SUCCESS_ENDPOINT'])
0f5acf4
to
d382eac
Compare
cephalopod/webinterface/frontend.py
Outdated
@@ -33,7 +33,8 @@ def get_server_fields(server): | |||
def login_required(): | |||
whitelist = current_app.config['USER_WHITELIST'] | |||
if 'user' not in session or session['user'] not in whitelist.get(session.get('provider'), set()): | |||
return multipass.logout(url_for('auth.login'), clear_session=True) | |||
next_url = request.full_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use request.full_path.rstrip('?')
to get rid of the ugly trailing ?
if there's no query string
.. instead of index page.
In case of not successful login, redirect to index and improve message.
d382eac
to
b6ab352
Compare
No description provided.