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

User subcommand #289

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

Standing-Man
Copy link
Contributor

Add additional subcommand for user command

  • harbor user reset [username] -> for reset the user's password
  • harbor user update [username] -> for update the user's profile

@Standing-Man
Copy link
Contributor Author

Hi @Vad1mo, I’ve added two additional subcommands under user and wanted to check if it would be helpful to include a subcommand for setting a user’s role to Administrator or revoking the Administrator role.

@bupd
Copy link
Contributor

bupd commented Dec 28, 2024

@Standing-Man Thanks for your contributions.

cmd/harbor/root/user/reset.go Outdated Show resolved Hide resolved
cmd/harbor/root/user/reset.go Outdated Show resolved Hide resolved
cmd/harbor/root/user/update.go Outdated Show resolved Hide resolved
cmd/harbor/root/user/update.go Outdated Show resolved Hide resolved
cmd/harbor/root/user/update.go Outdated Show resolved Hide resolved
pkg/api/user_handler.go Outdated Show resolved Hide resolved
pkg/api/user_handler.go Outdated Show resolved Hide resolved
@Standing-Man
Copy link
Contributor Author

enhance :

  • add --userID flag on update subcommand
  • fix the error handler of api.GetUsersIdByName
  • supplement the descriptions for reset and update
  • maintain log messages consistently

@Standing-Man Standing-Man requested a review from bupd December 28, 2024 05:11
@bupd
Copy link
Contributor

bupd commented Dec 29, 2024

@Standing-Man for the suggestions that are added mark the conversations as resolved.
Thanks

@Standing-Man
Copy link
Contributor Author

Thank you for your reminder @bupd. I have marked these conversations as resolved.

@Standing-Man
Copy link
Contributor Author

Hi @Vad1mo and @bupd, ready to review.

Copy link
Contributor

@bupd bupd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contributions

I have left some suggestions for improvements.

cmd/harbor/root/user/update.go Show resolved Hide resolved
pkg/views/user/update/view.go Outdated Show resolved Hide resolved
pkg/views/user/reset/view.go Show resolved Hide resolved
cmd/harbor/root/user/update.go Outdated Show resolved Hide resolved
cmd/harbor/root/user/reset.go Outdated Show resolved Hide resolved
Standing-Man and others added 13 commits February 5, 2025 20:01
* add: auto man documentation generate scripts

Signed-off-by: bupd <[email protected]>

add: auto documentation generate scripts

Signed-off-by: bupd <[email protected]>

* remove md_doc generation & add man docs

Signed-off-by: bupd <[email protected]>

* update dagger for generating man pages

Signed-off-by: bupd <[email protected]>

* update github workflow

Signed-off-by: bupd <[email protected]>

* update man doc generation

Signed-off-by: bupd <[email protected]>

* add cli and man docs

Signed-off-by: bupd <[email protected]>

* update workflow

Signed-off-by: bupd <[email protected]>

* move man pages to man1

Signed-off-by: bupd <[email protected]>

---------

Signed-off-by: bupd <[email protected]>
Signed-off-by: Alan Tang <[email protected]>
* Added first version of Makefile; include ldflags; tests, dependencies

Signed-off-by: Patrick Eschenbach <[email protected]>

* Added ldflags to build dagger functions

Signed-off-by: Patrick Eschenbach <[email protected]>

* Added requested changes in PR: Removed System flag; Removed prod fallback version; Fixed dev version to static version

Signed-off-by: Patrick Eschenbach <[email protected]>

* Added requested changes in PR: Removed System flag; Removed prod fallback version; Fixed dev version to static version; Removed bin files

Signed-off-by: Patrick Eschenbach <[email protected]>

* removes harbor-dev binary file

Signed-off-by: bupd <[email protected]>
Signed-off-by: Patrick Eschenbach <[email protected]>

* imporvment

Signed-off-by: Patrick Eschenbach <[email protected]>

* refactor build and build-dev

Signed-off-by: Patrick Eschenbach <[email protected]>

---------

Signed-off-by: Patrick Eschenbach <[email protected]>
Signed-off-by: bupd <[email protected]>
Co-authored-by: bupd <[email protected]>
Co-authored-by: Vadim Bauer <[email protected]>
Signed-off-by: Alan Tang <[email protected]>
…ds. (goharbor#77)

* Added the missing options in some commands and refactored some commands.

Added missing parameters in the (1) go client list function of the `repo` and `user` commands
(2) go client getLogs function of the `logs.go` file in project command
using options.
Added the `XIsResourceName` parameter for the `GetProjectParams` function. And refactored the `view.go` file of project command.
Refactored the `view.go` file of registry command: accessing the `credentialName`.

Signed-off-by: muaz-32 <[email protected]>

* remove inconsistencies

Signed-off-by: bupd <[email protected]>

---------

Signed-off-by: muaz-32 <[email protected]>
Signed-off-by: bupd <[email protected]>
Co-authored-by: bupd <[email protected]>
Signed-off-by: Alan Tang <[email protected]>
* configure linter

Signed-off-by: bupd <[email protected]>

* fix lint whitespace

Signed-off-by: bupd <[email protected]>

* update

Signed-off-by: bupd <[email protected]>

* add headers

Signed-off-by: bupd <[email protected]>

* update workflow

Signed-off-by: bupd <[email protected]>

* fix workflow

Signed-off-by: bupd <[email protected]>

* add debug in workflow

Signed-off-by: bupd <[email protected]>

* check lint

Signed-off-by: bupd <[email protected]>

* update actions summary

Signed-off-by: bupd <[email protected]>

* fix action

Signed-off-by: bupd <[email protected]>

* lint format github actions

Signed-off-by: bupd <[email protected]>

* stop upload result to github

Signed-off-by: bupd <[email protected]>

* upload lint report as html

Signed-off-by: bupd <[email protected]>

* check if html works

Signed-off-by: bupd <[email protected]>

* remove reviewdog and report in github actions format

Signed-off-by: bupd <[email protected]>

* fail lint

Signed-off-by: bupd <[email protected]>

* fix lint

Signed-off-by: bupd <[email protected]>

* fix lint

Signed-off-by: bupd <[email protected]>

---------

Signed-off-by: bupd <[email protected]>
Signed-off-by: Alan Tang <[email protected]>
* fix publish & release workflow

* This commit fixes
* publish on push to main
* release on push tags

Signed-off-by: bupd <[email protected]>

* update yaml

Signed-off-by: bupd <[email protected]>

---------

Signed-off-by: bupd <[email protected]>
Signed-off-by: Alan Tang <[email protected]>
Signed-off-by: Alan Tang <[email protected]>

chore: add files header

Signed-off-by: Alan Tang <[email protected]>

chore: add user subcommand doc

Signed-off-by: Alan Tang <[email protected]>

chore: add user subcommand doc

Signed-off-by: Alan Tang <[email protected]>
@Standing-Man Standing-Man force-pushed the user-subcommand branch 2 times, most recently from 405b122 to 3c9231d Compare February 6, 2025 01:54
@bupd
Copy link
Contributor

bupd commented Feb 10, 2025

The git history of this is not right.

Can you fix these ones. @Standing-Man

@Standing-Man
Copy link
Contributor Author

Standing-Man commented Feb 11, 2025

The git history of this is not right.

Can you fix these ones. @Standing-Man

Hi @bupd, I'm confused where the git history is wrong. Could you please point out?

Copy link
Contributor

@bupd bupd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the git commit history. only update files that are necessary

image

image

@Standing-Man Standing-Man mentioned this pull request Feb 11, 2025
@Standing-Man Standing-Man requested a review from bupd February 11, 2025 02:43
@Standing-Man
Copy link
Contributor Author

Hi @bupd, I resolved the git history issue by submitting PR #330.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants