Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
go
Commits
9116ba17
Commit
9116ba17
authored
Oct 14, 2013
by
Jean Michel Rouly
Browse files
Ok now I actually fixed registration reqmnt.
parent
9b611b46
Changes
1
Hide whitespace changes
Inline
Side-by-side
wsgi/authenticate.py
View file @
9116ba17
...
...
@@ -53,9 +53,9 @@ def application(environ, start_response):
# unregister the user, in case they're already in
#library.deactivate_user( hash_value )
if
(
library
.
user_registered
(
usr
)
):
# register the hashed user with the SQL database
registered
=
library
.
activate_user
(
hash_value
,
usr
)
if
(
registered
):
library
.
activate_user
(
hash_value
,
usr
)
# push the cookie to the user and redirect
status
=
'303 See Other'
response_headers
=
[(
'Set-Cookie'
,
cookie_value
),
...
...
@@ -63,7 +63,7 @@ def application(environ, start_response):
(
'Content-type'
,
'text/plain'
)]
start_response
(
status
,
response_headers
)
return
[
str
(
cookie
)
]
else
:
body
=
[
"<p>Error:
y
ou are not registered to use this service.</p>"
]
else
:
body
=
[
"<p>Error:
Y
ou are not registered to use this service.</p>"
]
else
:
body
=
[
"<p>Error: invalid username or password.</p>"
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment