Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinioAdmin: Add target user parameter to service account creation #1485

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion minio/minioadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,8 @@ def add_service_account(self,
description: str | None = None,
policy_file: str | None = None,
expiration: str | None = None,
status: str | None = None) -> str:
status: str | None = None,
target_user: str | None = None) -> str:
"""
Add a new service account with the given access key and secret key
"""
Expand All @@ -779,6 +780,8 @@ def add_service_account(self,
data["expiration"] = expiration
if status:
data["status"] = status
if target_user:
data["targetUser"] = target_user

body = json.dumps(data).encode()
response = self._url_open(
Expand Down
Loading