Skip to content

users in the project #1422

Closed
Closed

Description

@volodaiy

Description of the problem, including code/CLI snippet

Cannot get a list of all members from the project (inherited users from the group are not transferred)

_projects = list(gl.projects.list(all=True))

for project in projects:
print(project.id)
print(project.members.list(all=True))_

Expected Behavior

Returns all members of the project (request: /api/v4/projects/project_id/members/all?)

Actual Behavior

Returns members added directly to the project (no group)

Specifications

  • python-gitlab version: 2.6.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): 13.6.1-ee

Activity

  1. JohnVillalovos commented on Apr 28, 2021

    @JohnVillalovos
    Member

    Привет Vladimir,

    You need to use:
    https://python-gitlab.readthedocs.io/en/stable/gl_objects/projects.html#project-members

    project.members.all()
    

    Пока-пока,
    John

  2. volodaiy commented on Apr 28, 2021

    @volodaiy
    Author

    Thank you John, my carelessness, sorry)

  3. nejch commented on Apr 28, 2021

    @nejch
    Member

    Also if you hit any limitations with members.all() please subscribe to #1376. Once that is merged, the new syntax will take all the usual list() arguments and be more flexible.

  4. volodaiy commented on Apr 29, 2021

    @volodaiy
    Author

    Nejc, you are doing a good job, thank you!

  5. locked as resolved and limited conversation to collaborators on May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions