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
roomlist
Commits
fe3ffaf2
Commit
fe3ffaf2
authored
Jun 20, 2017
by
Daniel W Bond
Browse files
added conditional to addition of welcome messages on log in: do not welcome blocked students
parent
92cf7743
Pipeline
#1397
passed with stage
in 3 minutes and 23 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
roomlist/core/utils.py
View file @
fe3ffaf2
...
...
@@ -34,8 +34,10 @@ def custom_cas_login(request, *args, **kwargs):
elif
not
request
.
user
.
completedSocial
:
return
HttpResponseRedirect
(
reverse
(
'welcomeSocial'
))
else
:
welcome_back
=
random
.
choice
(
return_messages
)
messages
.
add_message
(
request
,
messages
.
INFO
,
mark_safe
(
welcome_back
))
# do not 'welcome back' blocked users
if
not
request
.
user
.
student
.
blocked
:
welcome_back
=
random
.
choice
(
return_messages
)
messages
.
add_message
(
request
,
messages
.
INFO
,
mark_safe
(
welcome_back
))
return
response
...
...
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