Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77583029
directory.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 15, 07:46
Size
1 KB
Mime Type
text/x-python
Expires
Sat, Aug 17, 07:46 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19879720
Attached To
rPHAPI Phabricator API scripts
directory.py
View Options
# -*- coding: utf-8 -*-
from
..
import
export
from
..
import
LDAPDirectory
import
ldap3
__author__
=
"Nicolas Richart"
__copyright__
=
"Copyright (C) 2016, EPFL (Ecole Polytechnique Fédérale "
\
"de Lausanne) - SCITAS (Scientific IT and Application "
\
"Support)"
__credits__
=
[
"Nicolas Richart"
]
__license__
=
"BSD"
__version__
=
"0.1"
__maintainer__
=
"Nicolas Richart"
__email__
=
"nicolas.richart@epfl.ch"
@export
class
Directory
(
LDAPDirectory
):
def
__init__
(
self
):
args
=
{
'basedn'
:
'o=epfl,c=ch'
,
'scope'
:
ldap3
.
SUBTREE
,
'uidNumber'
:
'uniqueIdentifier'
,
'gecos'
:
'gecos'
,
'uid'
:
'uid'
,
'user_filter'
:
'(&(objectClass=posixAccount)({attr}={value}))'
,
'user_group_attrs'
:
'memberOf'
,
'gidNumber'
:
'uniqueIdentifier'
,
'gid'
:
'cn'
,
'group_filter'
:
'(&(objectClass=groupOfNames)({attr}={value}))'
,
'group_member_filter'
:
'uniqueIdentifier'
,
'group_user_attrs'
:
'memberUniqueId'
,
}
super
(
Directory
,
self
)
.
__init__
(
'ldaps://scoldap.epfl.ch'
,
**
args
)
Event Timeline
Log In to Comment