@@ -705,6 +705,30 @@ class GroupMemberManager(CRUDMixin, RESTManager):
705705 _create_attrs = (('access_level' , 'user_id' ), ('expires_at' , ))
706706 _update_attrs = (('access_level' , ), ('expires_at' , ))
707707
708+ @cli .register_custom_action ('GroupMemberManager' )
709+ @exc .on_http_error (exc .GitlabListError )
710+ def all (self , ** kwargs ):
711+ """List all the members, included inherited ones.
712+
713+ Args:
714+ all (bool): If True, return all the items, without pagination
715+ per_page (int): Number of items to retrieve per request
716+ page (int): ID of the page to return (starts with page 1)
717+ as_list (bool): If set to False and no pagination option is
718+ defined, return a generator instead of a list
719+ **kwargs: Extra options to send to the server (e.g. sudo)
720+
721+ Raises:
722+ GitlabAuthenticationError: If authentication is not correct
723+ GitlabListError: If the list could not be retrieved
724+
725+ Returns:
726+ RESTObjectList: The list of members
727+ """
728+
729+ path = '%s/all' % self .path
730+ return self .gitlab .http_list (path , ** kwargs )
731+
708732
709733class GroupMergeRequest (RESTObject ):
710734 pass
@@ -1884,6 +1908,30 @@ class ProjectMemberManager(CRUDMixin, RESTManager):
18841908 _create_attrs = (('access_level' , 'user_id' ), ('expires_at' , ))
18851909 _update_attrs = (('access_level' , ), ('expires_at' , ))
18861910
1911+ @cli .register_custom_action ('ProjectMemberManager' )
1912+ @exc .on_http_error (exc .GitlabListError )
1913+ def all (self , ** kwargs ):
1914+ """List all the members, included inherited ones.
1915+
1916+ Args:
1917+ all (bool): If True, return all the items, without pagination
1918+ per_page (int): Number of items to retrieve per request
1919+ page (int): ID of the page to return (starts with page 1)
1920+ as_list (bool): If set to False and no pagination option is
1921+ defined, return a generator instead of a list
1922+ **kwargs: Extra options to send to the server (e.g. sudo)
1923+
1924+ Raises:
1925+ GitlabAuthenticationError: If authentication is not correct
1926+ GitlabListError: If the list could not be retrieved
1927+
1928+ Returns:
1929+ RESTObjectList: The list of members
1930+ """
1931+
1932+ path = '%s/all' % self .path
1933+ return self .gitlab .http_list (path , ** kwargs )
1934+
18871935
18881936class ProjectNote (RESTObject ):
18891937 pass
0 commit comments