Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
a931fe31
authored
Jun 05, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: handle keyerrors in saml attributes
parent
bd781d07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
circle/dashboard/models.py
+4
-2
No files found.
circle/dashboard/models.py
View file @
a931fe31
...
@@ -165,7 +165,8 @@ if hasattr(settings, 'SAML_ORG_ID_ATTRIBUTE'):
...
@@ -165,7 +165,8 @@ if hasattr(settings, 'SAML_ORG_ID_ATTRIBUTE'):
logger
.
debug
(
"org_id of
%
s already added to user
%
s's profile"
,
logger
.
debug
(
"org_id of
%
s already added to user
%
s's profile"
,
value
,
sender
.
username
)
value
,
sender
.
username
)
memberatrs
=
getattr
(
settings
,
'SAML_GROUP_ATTRIBUTES'
,
[])
memberatrs
=
getattr
(
settings
,
'SAML_GROUP_ATTRIBUTES'
,
[])
for
group
in
chain
(
*
[
attributes
[
i
]
for
i
in
memberatrs
]):
for
group
in
chain
(
*
[
attributes
[
i
]
for
i
in
memberatrs
if
i
in
attributes
]):
try
:
try
:
g
=
GroupProfile
.
search
(
group
)
g
=
GroupProfile
.
search
(
group
)
except
Group
.
DoesNotExist
:
except
Group
.
DoesNotExist
:
...
@@ -176,7 +177,8 @@ if hasattr(settings, 'SAML_ORG_ID_ATTRIBUTE'):
...
@@ -176,7 +177,8 @@ if hasattr(settings, 'SAML_ORG_ID_ATTRIBUTE'):
g
.
user_set
.
add
(
sender
)
g
.
user_set
.
add
(
sender
)
owneratrs
=
getattr
(
settings
,
'SAML_GROUP_OWNER_ATTRIBUTES'
,
[])
owneratrs
=
getattr
(
settings
,
'SAML_GROUP_OWNER_ATTRIBUTES'
,
[])
for
group
in
chain
(
*
[
attributes
[
i
]
for
i
in
owneratrs
]):
for
group
in
chain
(
*
[
attributes
[
i
]
for
i
in
owneratrs
if
i
in
attributes
]):
try
:
try
:
g
=
GroupProfile
.
search
(
group
)
g
=
GroupProfile
.
search
(
group
)
except
Group
.
DoesNotExist
:
except
Group
.
DoesNotExist
:
...
...
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