Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flowspy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
flowspy
Commits
4b9e3e40
Commit
4b9e3e40
authored
Aug 28, 2014
by
Leonidas Poulopoulos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce optional username slugif-ication
parent
537b8cb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
flowspec/views.py
flowspec/views.py
+4
-1
No files found.
flowspec/views.py
View file @
4b9e3e40
...
...
@@ -54,6 +54,7 @@ from utils.decorators import shib_required
from
django.views.decorators.cache
import
never_cache
from
django.conf
import
settings
from
django.core.mail.message
import
EmailMessage
from
django.template.defaultfilters
import
slugify
import
datetime
import
os
...
...
@@ -372,7 +373,7 @@ def user_login(request):
error_mail
=
False
has_entitlement
=
False
error
=
''
username
=
request
.
META
[
'HTTP_EPPN'
]
username
=
lookupShibAttr
(
settings
.
SHIB_USERNAME
,
request
.
META
)
if
not
username
:
error_username
=
True
firstname
=
lookupShibAttr
(
settings
.
SHIB_FIRSTNAME
,
request
.
META
)
...
...
@@ -401,6 +402,8 @@ def user_login(request):
return
render_to_response
(
'error.html'
,
{
'error'
:
error
,
"missing_attributes"
:
True
},
context_instance
=
RequestContext
(
request
))
try
:
if
settings
.
SHIB_SLUGIFY_USERNAME
:
username
=
slugify
(
username
)
user
=
User
.
objects
.
get
(
username__exact
=
username
)
user
.
email
=
mail
user
.
first_name
=
firstname
...
...
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