Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add group.members.remove optionsskip_subresources andunassign_issuables #3230

Closed as not planned
@matthias-reiff

Description

@matthias-reiff

Description of the problem, including code/CLI snippet

Current implementation to remove members from GitLab group is:
group.members.delete(member_id)
Additionally to themember_id parameter, the rest API endpoint provides two options which are currently not available in the python-gitlab group members delete method (Reference):

  • skip_subresources
  • unassign_issuables

This is especially relevant, asskip_subresources has the default valuefalse. The pendant in the Web UI is theAlso remove direct user membership from subgroups and projects option which needs to be ticked actively, suggerating a default valueskip_subresources = true:

Image

As the option forskip_subresources is not available in the python-gitlab library, the default value offalse is enforced. This may lead to unexpected behavior, when only the group level access right should be removed without removing access rights to subresources.

Example

  • Create groupfoo
  • Create projectfoo/bar
  • Grant userxyz Maintainer access to projectfoo/bar
  • Grant userxyz Developer access to groupfoo
  • Deletexyz as member from groupfoo using default behavior:
    A) WebUI: userxyz stays Maintainer member in projectfoo/bar
    B) python-gitlab: userxyz looses also Maintainer access in projectfoo/bar

Expected Behavior

There should be the same parameters available ingroup.members.delete(member_id) as in the Rest API:

group.members.delete(member_id=membe_id,skip_subresources=False,unassign_issuables=False)

Actual Behavior

Currently those flags can not be specified, enforcing the default behavior defined in the Rest API.

Specifications

  • python-gitlab version: 6.1.0
  • Gitlab server version (or gitlab.com): v17.11.6-ee

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp