mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 07:22:34 +00:00
Add notification at info-bar, and fix bug in visiting register/login page when user is already logged in.
This commit is contained in:
@@ -23,10 +23,14 @@ from seaserv import get_ccnetuser
|
||||
@csrf_protect
|
||||
@never_cache
|
||||
def login(request, template_name='registration/login.html',
|
||||
redirect_if_logged_in=None,
|
||||
redirect_field_name=REDIRECT_FIELD_NAME,
|
||||
authentication_form=AuthenticationForm):
|
||||
"""Displays the login form and handles the login action."""
|
||||
|
||||
if request.user.is_authenticated() and redirect_if_logged_in:
|
||||
return HttpResponseRedirect(reverse(redirect_if_logged_in))
|
||||
|
||||
redirect_to = request.REQUEST.get(redirect_field_name, '')
|
||||
|
||||
if request.method == "POST":
|
||||
|
Reference in New Issue
Block a user