goharbor / harbor-cli

[Sandbox] Official Harbor CLI
Apache License 2.0
31 stars 37 forks source link

Add Project Member Management Commands #85

Open bupd opened 3 months ago

bupd commented 3 months ago

Overview:

The current CLI lacks the ability to manage project members, a feature already present in the WebUI. Adding a member command will significantly enhance the CLI's functionality, making it a powerful tool for handling project members directly from the command line.

This addition will facilitate easier and more efficient management of project members, aligning the CLI's capabilities with those of the WebUI.

New Commands:

The member command will include the following subcommands:

This PR adds the commands to manage project members.

Vad1mo commented 3 months ago

Also you need to consider the group memberships, especially in the context of OIDC and LDAP a few things might behaive differently

bupd commented 3 months ago

Thank you for bringing up group memberships. That is a valid point and crucial for comprehensive member management. I will take that into consideration as I continue to develop this feature.

bupd commented 3 months ago

List:

memberList

Create:

memberCreate

Delete:

memberDelete

bupd commented 3 months ago

Update:

MemberUpdate

View:

memberView

bupd commented 2 months ago

This PR #85 is ready for review @Vad1mo

Vad1mo commented 2 months ago

I agree. lets follow the UI here.

bupd commented 2 months ago

Added & updated with new changes. This PR is ready to be merged.

Thanks.

Vad1mo commented 2 months ago

Add Users or groups to project in the wizard it is not clear for the user what are the mandatory fields and what fields are alternatives like user_id and user_name (only one is needed),

image

Group Type

Conclusion

My recommendation is that in the Wizard flow we should guide the user more. In the cli flags mode we can be more flexible, but should indicate which options can be one the other like user_id and user_name. Where one is mandatory. this should be visible in the wizard and cli mode.