Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2c4b576b
authored
Apr 14, 2015
by
Guba Sándor
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-org_id' into 'master'
Convert orgid to upper
✅
#401 See merge request !319
parents
77a4efd9
7f29f16e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
circle/dashboard/models.py
+2
-2
circle/dashboard/views/group.py
+1
-1
circle/dashboard/views/util.py
+1
-1
No files found.
circle/dashboard/models.py
View file @
2c4b576b
...
...
@@ -309,7 +309,7 @@ if hasattr(settings, 'SAML_ORG_ID_ATTRIBUTE'):
attributes
=
kwargs
.
pop
(
'attributes'
)
atr
=
settings
.
SAML_ORG_ID_ATTRIBUTE
try
:
value
=
attributes
[
atr
][
0
]
value
=
attributes
[
atr
][
0
]
.
upper
()
except
Exception
as
e
:
value
=
None
logger
.
info
(
"save_org_id couldn't find attribute.
%
s"
,
unicode
(
e
))
...
...
@@ -339,7 +339,7 @@ if hasattr(settings, 'SAML_ORG_ID_ATTRIBUTE'):
group
,
unicode
(
g
))
g
.
user_set
.
add
(
sender
)
for
i
in
FutureMember
.
objects
.
filter
(
org_id
=
value
):
for
i
in
FutureMember
.
objects
.
filter
(
org_id
__iexact
=
value
):
i
.
group
.
user_set
.
add
(
sender
)
i
.
delete
()
...
...
circle/dashboard/views/group.py
View file @
2c4b576b
...
...
@@ -146,7 +146,7 @@ class GroupDetailView(CheckedDetailView):
self
.
object
.
user_set
.
add
(
entity
)
except
User
.
DoesNotExist
:
if
saml_available
:
FutureMember
.
objects
.
get_or_create
(
org_id
=
name
,
FutureMember
.
objects
.
get_or_create
(
org_id
=
name
.
upper
()
,
group
=
self
.
object
)
else
:
messages
.
warning
(
request
,
_
(
'User "
%
s" not found.'
)
%
name
)
...
...
circle/dashboard/views/util.py
View file @
2c4b576b
...
...
@@ -70,7 +70,7 @@ def search_user(keyword):
return
User
.
objects
.
get
(
username
=
keyword
)
except
User
.
DoesNotExist
:
try
:
return
User
.
objects
.
get
(
profile__org_id
=
keyword
)
return
User
.
objects
.
get
(
profile__org_id
__iexact
=
keyword
)
except
User
.
DoesNotExist
:
return
User
.
objects
.
get
(
email
=
keyword
)
...
...
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