Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
warpinfra
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infrastruktur
warpinfra
Commits
80b6cc31
Commit
80b6cc31
authored
8 years ago
by
Christian Dresen
Browse files
Options
Downloads
Patches
Plain Diff
[WarpAuth] Adapted to new ldap config
parent
52bf8ec5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
www/web/warpauth/models.py
+3
-2
3 additions, 2 deletions
www/web/warpauth/models.py
www/web/warpzone/settings.py
+3
-3
3 additions, 3 deletions
www/web/warpzone/settings.py
with
6 additions
and
5 deletions
www/web/warpauth/models.py
+
3
−
2
View file @
80b6cc31
...
...
@@ -38,6 +38,7 @@ class LdapUser(ldapdb.models.Model):
uidNumber
=
CharField
(
db_column
=
'
uidNumber
'
,
max_length
=
200
)
gidNumber
=
CharField
(
db_column
=
'
gidNumber
'
,
max_length
=
200
)
homeDirectory
=
CharField
(
db_column
=
'
homeDirectory
'
,
max_length
=
200
)
def
__str__
(
self
):
return
self
.
uid
...
...
@@ -53,11 +54,11 @@ class LdapUserForm(ModelForm):
class
LdapGroup
(
ldapdb
.
models
.
Model
):
base_dn
=
"
ou=groups,dc=warpzone,dc=ms
"
object_classes
=
[
'
posixGroup
'
]
object_classes
=
[
'
groupOfUniqueNames
'
]
gid
=
IntegerField
(
db_column
=
'
gidNumber
'
,
unique
=
True
)
name
=
CharField
(
db_column
=
'
cn
'
,
max_length
=
200
,
primary_key
=
True
)
members
=
ListField
(
db_column
=
'
m
ember
Uid
'
)
members
=
ListField
(
db_column
=
'
uniqueM
ember
'
)
def
__str__
(
self
):
return
self
.
name
...
...
This diff is collapsed.
Click to expand it.
www/web/warpzone/settings.py
+
3
−
3
View file @
80b6cc31
...
...
@@ -2,7 +2,7 @@ import os
import
ldap
import
logging
import
configparser
from
django_auth_ldap.config
import
LDAPSearch
,
GroupOfNamesType
,
PosixGroupType
from
django_auth_ldap.config
import
LDAPSearch
,
GroupOfUniqueNamesType
,
GroupOfNamesType
,
PosixGroupType
from
django.core.urlresolvers
import
reverse_lazy
BASE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))
...
...
@@ -169,10 +169,10 @@ AUTH_LDAP_PROFILE_ATTR_MAP = {"home_directory": "homeDirectory"}
AUTH_LDAP_GROUP_SEARCH
=
LDAPSearch
(
LDAP_GROUP_SEARCH_PATH
,
ldap
.
SCOPE_SUBTREE
,
"
(objectClass=
posixGroup
)
"
ldap
.
SCOPE_SUBTREE
,
"
(objectClass=
groupOfUniqueNames
)
"
)
AUTH_LDAP_GROUP_TYPE
=
Posix
GroupType
()
AUTH_LDAP_GROUP_TYPE
=
Group
OfUniqueNames
Type
()
AUTH_LDAP_USER_FLAGS_BY_GROUP
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment