Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
31419716
authored
Mar 08, 2017
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
settings: Add extra LDAP group types
parent
c18cc042
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
circle/circle/settings/base.py
+10
-5
No files found.
circle/circle/settings/base.py
View file @
31419716
...
@@ -591,19 +591,25 @@ TWO_FACTOR_ISSUER = get_env_variable("TWO_FACTOR_ISSUER", "CIRCLE")
...
@@ -591,19 +591,25 @@ TWO_FACTOR_ISSUER = get_env_variable("TWO_FACTOR_ISSUER", "CIRCLE")
if
get_env_variable
(
'LDAP_AUTH'
,
'FALSE'
)
==
'TRUE'
:
if
get_env_variable
(
'LDAP_AUTH'
,
'FALSE'
)
==
'TRUE'
:
import
ldap
import
ldap
from
django_auth_ldap.config
import
(
from
django_auth_ldap.config
import
(
LDAPSearch
,
GroupOfNamesType
,
PosixGroupType
,
ActiveDirectoryGroupType
LDAPSearch
,
PosixGroupType
,
NISGroupType
,
MemberDNGroupType
,
GroupOfNamesType
,
GroupOfUniqueNamesType
,
ActiveDirectoryGroupType
,
OrganizationalRoleGroupType
,
)
)
LDAP_SCOPE_MAP
=
{
LDAP_SCOPE_MAP
=
{
"SUBTREE"
:
ldap
.
SCOPE_SUBTREE
,
"SUBTREE"
:
ldap
.
SCOPE_SUBTREE
,
"BASE"
:
ldap
.
SCOPE_BASE
,
"BASE"
:
ldap
.
SCOPE_BASE
,
"ONELEVEL"
:
ldap
.
SCOPE_SUBTREE
"ONELEVEL"
:
ldap
.
SCOPE_SUBTREE
,
}
}
LDAP_GROUP_MAP
=
{
LDAP_GROUP_MAP
=
{
"POSIX"
:
PosixGroupType
(),
"POSIX"
:
PosixGroupType
(),
"AD"
:
ActiveDirectoryGroupType
(),
"NIS"
:
NISGroupType
(),
"MEMBER_DN"
:
MemberDNGroupType
(),
"GROUP_OF_NAMES"
:
GroupOfNamesType
(),
"GROUP_OF_NAMES"
:
GroupOfNamesType
(),
"GROUP_OF_UNIQUE_NAMES"
:
GroupOfUniqueNamesType
(),
"AD"
:
ActiveDirectoryGroupType
(),
"ORG_ROLE"
:
OrganizationalRoleGroupType
(),
}
}
# Baseline configuration.
# Baseline configuration.
...
@@ -650,9 +656,8 @@ if get_env_variable('LDAP_AUTH', 'FALSE') == 'TRUE':
...
@@ -650,9 +656,8 @@ if get_env_variable('LDAP_AUTH', 'FALSE') == 'TRUE':
'django_auth_ldap.backend.LDAPBackend'
,
'django_auth_ldap.backend.LDAPBackend'
,
)
)
# org_id attribute
LDAP_ORG_ID_ATTRIBUTE
=
(
LDAP_ORG_ID_ATTRIBUTE
=
(
get_env_variable
(
'LDAP_ORG_ID_ATTRIBUTE'
,
""
)
==
"TRUE"
)
get_env_variable
(
"LDAP_ORG_ID_ATTRIBUTE"
,
""
)
==
"TRUE"
)
LDAP_GROUP_OWNER_ATTRIBUTE
=
get_env_variable
(
"LDAP_GROUP_OWNER_ATTRIBUTE"
,
LDAP_GROUP_OWNER_ATTRIBUTE
=
get_env_variable
(
"LDAP_GROUP_OWNER_ATTRIBUTE"
,
"owner"
)
"owner"
)
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