user.sync
Attributes
Classes
dict() -> new empty dictionary |
|
Generalized UserSource to facilitate ldap sync |
|
Generalized UserSource to facilitate ldap sync |
Module Contents
- class user.sync.UserSourceArgsWithoutName[source]
Bases:
TypedDict
dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s
(key, value) pairs
- dict(iterable) -> new dictionary initialized as if via:
d = {} for k, v in iterable:
d[k] = v
- dict(**kwargs) -> new dictionary initialized with the name=value pairs
in the keyword argument list. For example: dict(one=1, two=2)
- class user.sync.UserSource(name: str, bases: Sequence[str], org: Any | None = None, filters: Sequence[str] | None = None, user_type: str | None = None, default_filter: str = '(objectClass=*)', verbose: bool = False)[source]
Generalized UserSource to facilitate ldap sync
- static scalar(value: list[str] | str | None, default: str = '') str [source]
- static scalar(value: list[_T] | _T | None, default: _T) _T
- excluded_default(entry: ldap3.Entry) bool [source]
Default when no function specific to the source name exists.
- excluded(entry: ldap3.Entry) bool [source]
Finds a specific exclusion function specific to the name or use the fallback
- class user.sync.ZugUserSource(name: str, bases: Sequence[str], org: Any | None = None, filters: Sequence[str] | None = None, user_type: str | None = None, default_filter: str = '(objectClass=*)', verbose: bool = False)[source]
Bases:
UserSource
Generalized UserSource to facilitate ldap sync
- schools: dict[str, UserSourceArgsWithoutName][source]
- ldap_users: dict[str, UserSourceArgsWithoutName][source]
- user_type_default(entry: ldap3.Entry) str | None [source]
For all the schools, we filter by Mail already, but we exclude the students. Name specific user_type functions will run first, this is a fallback.
- complete_entry(user: dict[str, Any], **kwargs: Any) dict[str, Any] [source]
Add additional logic after the user is mapped before writing to the db.
- classmethod factory(verbose: bool = False) list[ZugUserSource] [source]