|
7 | 7 | from gitlab import exceptions as exc
|
8 | 8 | from gitlab import types
|
9 | 9 | from gitlab.base import RESTManager, RESTObject
|
10 |
| -from gitlab.mixins import CRUDMixin, ListMixin, ObjectDeleteMixin, SaveMixin |
| 10 | +from gitlab.mixins import ( |
| 11 | + CRUDMixin, |
| 12 | + ListMixin, |
| 13 | + NoUpdateMixin, |
| 14 | + ObjectDeleteMixin, |
| 15 | + SaveMixin, |
| 16 | +) |
11 | 17 | from gitlab.types import RequiredOptional
|
12 | 18 |
|
13 | 19 | from .access_requests import GroupAccessRequestManager # noqa: F401
|
|
49 | 55 | "GroupDescendantGroupManager",
|
50 | 56 | "GroupSubgroup",
|
51 | 57 | "GroupSubgroupManager",
|
| 58 | + "GroupSAMLGroupLink", |
| 59 | + "GroupSAMLGroupLinkManager", |
52 | 60 | ]
|
53 | 61 |
|
54 | 62 |
|
@@ -88,6 +96,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject):
|
88 | 96 | subgroups: "GroupSubgroupManager"
|
89 | 97 | variables: GroupVariableManager
|
90 | 98 | wikis: GroupWikiManager
|
| 99 | + saml_group_links: "GroupSAMLGroupLinkManager" |
91 | 100 |
|
92 | 101 | @cli.register_custom_action("Group", ("project_id",))
|
93 | 102 | @exc.on_http_error(exc.GitlabTransferProjectError)
|
@@ -399,3 +408,15 @@ class GroupDescendantGroupManager(GroupSubgroupManager):
|
399 | 408 |
|
400 | 409 | _path = "/groups/{group_id}/descendant_groups"
|
401 | 410 | _obj_cls: Type[GroupDescendantGroup] = GroupDescendantGroup
|
| 411 | + |
| 412 | + |
| 413 | +class GroupSAMLGroupLink(ObjectDeleteMixin, RESTObject): |
| 414 | + _id_attr = "name" |
| 415 | + _repr_attr = "name" |
| 416 | + |
| 417 | + |
| 418 | +class GroupSAMLGroupLinkManager(NoUpdateMixin, RESTManager): |
| 419 | + _path = "/groups/{group_id}/saml_group_links" |
| 420 | + _obj_cls: Type[GroupSAMLGroupLink] = GroupSAMLGroupLink |
| 421 | + _from_parent_attrs = {"group_id": "id"} |
| 422 | + _create_attrs = RequiredOptional(required=("saml_group_name", "access_level")) |
0 commit comments