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

Add options to the user.Count method #16285

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

stonezdj
Copy link
Contributor

Exclude the admin account by default
Fixes #16269

Signed-off-by: stonezdj stonezdj@gmail.com

@codecov
Copy link

codecov bot commented Jan 25, 2022

Codecov Report

Merging #16285 (cbf0296) into main (6917021) will decrease coverage by 4.38%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16285      +/-   ##
==========================================
- Coverage   71.41%   67.03%   -4.39%     
==========================================
  Files         746      980     +234     
  Lines       69394    82354   +12960     
  Branches        0     2630    +2630     
==========================================
+ Hits        49557    55205    +5648     
- Misses      16357    23353    +6996     
- Partials     3480     3796     +316     
Flag Coverage Δ
unittests 67.03% <63.63%> (-4.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/controller/config/controller.go 10.22% <0.00%> (ø)
src/pkg/user/manager.go 52.87% <70.00%> (+2.87%) ⬆️
src/common/utils/passports.go 84.61% <0.00%> (-5.13%) ⬇️
...c/app/base/project/repository/artifact/artifact.ts 51.85% <0.00%> (ø)
...n/replication-tasks/replication-tasks.component.ts 47.61% <0.00%> (ø)
...on-schedule/cron-tooltip/cron-tooltip.component.ts 100.00% <0.00%> (ø)
...ccounts/projects-modal/projects-modal.component.ts 50.00% <0.00%> (ø)
...confirmation-dialog/confirmation-dialog.service.ts 62.50% <0.00%> (ø)
...t-side-nav/clearing-job/gc-page/gc/gc.component.ts 54.54% <0.00%> (ø)
...omponents/global-search/search-result.component.ts 56.52% <0.00%> (ø)
... and 230 more

@stonezdj stonezdj force-pushed the 22jan25_user_count_mismatch branch 3 times, most recently from 81f7702 to 39ef475 Compare January 26, 2022 09:22
src/pkg/user/manager.go Outdated Show resolved Hide resolved
Copy link
Contributor

@wy65701436 wy65701436 left a comment

Choose a reason for hiding this comment

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

lgtm

@stonezdj stonezdj closed this Jul 6, 2022
@stonezdj stonezdj reopened this Jul 6, 2022
  Fixes goharbor#16269, exclude the admin account by default
  Add excludeDefaultAdmin method -- exclude default admin by option
  Update authModeCanBeModified method -- the user count should be 0 without admin

Signed-off-by: stonezdj <stonezdj@gmail.com>
@stonezdj stonezdj force-pushed the 22jan25_user_count_mismatch branch from 224cc1a to cbf0296 Compare July 6, 2022 04:11
@stonezdj stonezdj requested a review from a team as a code owner July 6, 2022 04:11
@stonezdj stonezdj added the release-note/update Update or Fix label Jul 6, 2022
@stonezdj stonezdj merged commit dcccb44 into goharbor:main Jul 6, 2022
sluetze pushed a commit to sluetze/harbor that referenced this pull request Oct 29, 2022
Fixes goharbor#16269, exclude the admin account by default
  Add excludeDefaultAdmin method -- exclude default admin by option
  Update authModeCanBeModified method -- the user count should be 0 without admin

Signed-off-by: stonezdj <stonezdj@gmail.com>
mcsage pushed a commit to mcsage/harbor that referenced this pull request Feb 16, 2023
Fixes goharbor#16269, exclude the admin account by default
  Add excludeDefaultAdmin method -- exclude default admin by option
  Update authModeCanBeModified method -- the user count should be 0 without admin

Signed-off-by: stonezdj <stonezdj@gmail.com>
Signed-off-by: Stephan Hohn <stephan.hohn@tech11.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User count is incorrect
4 participants