-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from alan-turing-institute/33-groups-of-groups
Add groups of groups
- Loading branch information
Showing
21 changed files
with
460 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
from .ldap_attribute_adaptor import LDAPAttributeAdaptor | ||
from .ldap_group_of_names import LDAPGroupOfNames | ||
from .ldap_inetorgperson import LDAPInetOrgPerson | ||
from .ldap_inetuser import LDAPInetUser | ||
from .ldap_oauthuser import LDAPOAuthUser | ||
from .ldap_person import LDAPPerson | ||
from .ldap_posix_account import LDAPPosixAccount | ||
from .ldap_posix_group import LDAPPosixGroup | ||
from .named_ldap_class import NamedLDAPClass | ||
from .overlay_memberof import OverlayMemberOf | ||
from .overlay_oauthentry import OverlayOAuthEntry | ||
|
||
__all__ = [ | ||
"LDAPAttributeAdaptor", | ||
"LDAPGroupOfNames", | ||
"LDAPInetOrgPerson", | ||
"LDAPInetUser", | ||
"LDAPOAuthUser", | ||
"LDAPPerson", | ||
"LDAPPosixAccount", | ||
"LDAPPosixGroup", | ||
"NamedLDAPClass", | ||
"OverlayMemberOf", | ||
"OverlayOAuthEntry", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
from pydantic import BaseModel | ||
from .named_ldap_class import NamedLDAPClass | ||
|
||
|
||
class LDAPGroupOfNames(BaseModel): | ||
class LDAPGroupOfNames(NamedLDAPClass): | ||
""" | ||
A group with named members | ||
OID: 2.5.6.9 | ||
Object class: Structural | ||
Parent: top | ||
Schema: rfc4519 | ||
""" | ||
|
||
cn: str | ||
description: str | ||
member: list[str] | ||
|
||
def names(self) -> list[str]: | ||
return ["groupOfNames"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
from pydantic import BaseModel | ||
from .ldap_organizational_person import LDAPOrganizationalPerson | ||
|
||
|
||
class LDAPInetOrgPerson(BaseModel): | ||
class LDAPInetOrgPerson(LDAPOrganizationalPerson): | ||
""" | ||
A person belonging to an internet/intranet directory service | ||
OID: 2.16.840.1.113730.3.2.2 | ||
Object class: Structural | ||
Parent: organizationalPerson | ||
Schema: rfc2798 | ||
""" | ||
|
||
cn: str | ||
description: str | ||
displayName: str # noqa: N815 | ||
givenName: str # noqa: N815 | ||
sn: str | ||
|
||
def names(self) -> list[str]: | ||
return [*super().names(), "inetOrgPerson"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from .ldap_person import LDAPPerson | ||
|
||
|
||
class LDAPOrganizationalPerson(LDAPPerson): | ||
""" | ||
A person belonging to an organisation | ||
OID: 2.5.6.7 | ||
Object class: Structural | ||
Parent: person | ||
Schema: rfc4519 | ||
""" | ||
|
||
description: str | ||
|
||
def names(self) -> list[str]: | ||
return [*super().names(), "organizationalPerson"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
from pydantic import BaseModel | ||
from .named_ldap_class import NamedLDAPClass | ||
|
||
|
||
class LDAPPerson(BaseModel): | ||
class LDAPPerson(NamedLDAPClass): | ||
""" | ||
A named person | ||
OID: 2.5.6.6 | ||
Object class: Structural | ||
Parent: top | ||
Schema: rfc4519 | ||
""" | ||
|
||
cn: str | ||
sn: str | ||
|
||
def names(self) -> list[str]: | ||
return ["person"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from pydantic import BaseModel | ||
|
||
|
||
class NamedLDAPClass(BaseModel): | ||
def names(self) -> list[str]: | ||
"""List of names for this LDAP object class""" | ||
return [] |
Oops, something went wrong.