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

project member {remove, update-role} should support usernames #84

Open
pederhan opened this issue Oct 17, 2023 · 0 comments
Open

project member {remove, update-role} should support usernames #84

pederhan opened this issue Oct 17, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@pederhan
Copy link
Member

Currently you need to fetch the member ID for a user via project member list and then filter those results by username. This is an inconvenient API for users.

Signatures:

> project member remove --help
                                                                                           
 Usage: harbor  project member remove [OPTIONS] PROJECT_NAME_OR_ID MEMBER_ID               
                                                                                           
╭─ Arguments ─────────────────────────────────────────────────────────────────────────────╮
│ *    project_name_or_id      TEXT     Name or ID of the project to use. Prefix with     │
│                                       'id:' to specify an ID.                           │
│                                       [default: None]                                   │
│                                       [required]                                        │
│ *    member_id               INTEGER  The ID of the member to remove. [default: None]   │
│                                       [required]                                        │
╰─────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────╯

> project member update-role --help

 Usage: harbor  project member update-role [OPTIONS] PROJECT_NAME_OR_ID                    
                                           MEMBER_ID ROLE:{admin|developer|gues            
                                           t|maintainer}                                   
                                                                                           
 Add a user as a member of a project.                                                      
                                                                                           
╭─ Arguments ─────────────────────────────────────────────────────────────────────────────╮
│ *    project_name_or_id      TEXT                         Name or ID of the project to  │
│                                                           use. Prefix with 'id:' to     │
│                                                           specify an ID.                │
│                                                           [default: None]               │
│                                                           [required]                    │
│ *    member_id               INTEGER                      The ID of the member to       │
│                                                           update.                       │
│                                                           [default: None]               │
│                                                           [required]                    │
│ *    role                    ROLE:{admin|developer|guest  The type of role to give the  │
│                              |maintainer}                 user.                         │
│                                                           [default: None]               │
│                                                           [required]                    │
╰─────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────╮
│ --help          Show this message and exit.                                             │
╰─────────────────────────────────────────────────────────────────────────────────────────╯
@pederhan pederhan added the enhancement New feature or request label Oct 17, 2023
@pederhan pederhan added this to Harbor Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant