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 group cli to editoast #9734

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Add group cli to editoast #9734

merged 1 commit into from
Nov 20, 2024

Conversation

flomonster
Copy link
Contributor

@flomonster flomonster commented Nov 15, 2024

Add a bunch of commands to manage users and groups.

close #8754

@github-actions github-actions bot added the area:editoast Work on Editoast Service label Nov 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 131 lines in your changes missing coverage. Please review.

Project coverage is 37.80%. Comparing base (a4daa6d) to head (bb0e0d9).
Report is 16 commits behind head on dev.

Files with missing lines Patch % Lines
editoast/src/client/group.rs 0.00% 95 Missing ⚠️
editoast/src/client/user.rs 0.00% 36 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #9734      +/-   ##
==========================================
- Coverage   37.85%   37.80%   -0.06%     
==========================================
  Files         990      992       +2     
  Lines       90928    91097     +169     
  Branches     1176     1176              
==========================================
+ Hits        34423    34439      +16     
- Misses      56051    56204     +153     
  Partials      454      454              
Flag Coverage Δ
editoast 72.97% <0.00%> (-0.34%) ⬇️
front 20.10% <ø> (-0.01%) ⬇️
gateway 2.18% <ø> (ø)
osrdyne 3.28% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 86.74% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@flomonster flomonster force-pushed the fam/add-group-cli branch 2 times, most recently from 7e2d564 to de4f091 Compare November 18, 2024 17:51
@flomonster flomonster marked this pull request as ready for review November 18, 2024 17:53
@flomonster flomonster requested a review from a team as a code owner November 18, 2024 17:53
@github-actions github-actions bot removed the area:editoast Work on Editoast Service label Nov 18, 2024
Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

Tested. A few comments about the interface:

  • both group include and group exclude accept an empty list of users and exit 0 without a warning of some sort
  • if a user ID provided to group include doesn't exist, the postgres error is the only one shown (insert or update on table "authn_group_membership" violates foreign key constraint "authn_group_membership_user_fkey")
  • group exclude doesn't check that the provided users actually exist and are in the group. In which case the command does nothing and exits 0.

Those remarks are not that important especially since this CLI should be merged fast, but I'd rather draw some attention to them just to be sure.

Signed-off-by: Florian Amsallem <[email protected]>
@flomonster flomonster enabled auto-merge November 20, 2024 09:22
@flomonster flomonster added this pull request to the merge queue Nov 20, 2024
Merged via the queue into dev with commit e950f1c Nov 20, 2024
27 checks passed
@flomonster flomonster deleted the fam/add-group-cli branch November 20, 2024 10:37
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.

User and group management CLI
3 participants