From 065a1a5a32d34286df44800084285b30b934f911 Mon Sep 17 00:00:00 2001 From: "John L. Villalovos" Date: Mon, 4 Jul 2022 23:42:51 -0700 Subject: [PATCH] docs(users): add docs about listing a user's projects Add docs about listing a user's projects. Update docs on the membership API to update the URL to the upstream docs and also add a note that it requires Administrator access to use. --- docs/gl_objects/users.rst | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/gl_objects/users.rst b/docs/gl_objects/users.rst index 996459d69..80eea1ca4 100644 --- a/docs/gl_objects/users.rst +++ b/docs/gl_objects/users.rst @@ -192,6 +192,31 @@ Revoke (delete) an impersonation token for a user:: i_t.delete() +User projects +========================= + +References +---------- + +* v4 API: + + + :class:`gitlab.v4.objects.UserProject` + + :class:`gitlab.v4.objects.UserProjectManager` + + :attr:`gitlab.v4.objects.User.projects` + +* GitLab API: https://docs.gitlab.com/ee/api/projects.html#list-user-projects + +List visible projects in the user's namespace:: + + projects = user.projects.list() + +.. note:: + + Only the projects in the user’s namespace are returned. Projects owned by + the user in any group or subgroups are not returned. An empty list is + returned if a profile is set to private. + + User memberships ========================= @@ -204,7 +229,7 @@ References + :class:`gitlab.v4.objects.UserMembershipManager` + :attr:`gitlab.v4.objects.User.memberships` -* GitLab API: https://docs.gitlab.com/ee/api/users.html#user-memberships-admin-only +* GitLab API: https://docs.gitlab.com/ee/api/users.html#user-memberships List direct memberships for a user:: @@ -218,6 +243,10 @@ List only direct group memberships:: memberships = user.memberships.list(type='Namespace') +.. note:: + + This endpoint requires admin access. + Current User ============ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy