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

sudo should be remembered for SaveMixin objects #532

Closed
@JonathonReinhart

Description

@JonathonReinhart

Description of the problem, including code/CLI snippet

grp=gl.groups.get('example-group')notif=grp.notificationsettings.get(sudo=otheruser)print("Old level:",notif.level)notif.level=gitlab.const.NOTIFICATION_LEVEL_GLOBALnotif.save()# missing sudo=otherusernotif=grp.notificationsettings.get(sudo=otheruser)print("New level:",notif.level)

Expected Behavior

I would expect this to change the notification level for the sudo'd user.

Actual Behavior

When I callnotif.save(), it has seemingly no effect, because I am missingsudo.

Instead, the changes were appliedto my admin account!

Changing the code tonotif.save(sudo=otheruser) works as expected.

Specifications

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

Proposal

If an object is acquired usingsudo=user, perhaps the library canattach thatsudo user to theSaveMixin object, and automatically apply it when.save() is called without arguments.

I consider this a bug, and I can't imagine that anyone isactually relying on the current behavior.

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