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 avo MFA reset admin action & view of audit entries #3426

Merged

Conversation

segiddins
Copy link
Member

@segiddins segiddins commented Feb 10, 2023

Based on #3417

Still need to:

  • Move logic out of erb & into component
  • Add new component for object diff
  • Add separate field for arguments & fields
  • Remove raw json view of audited_changes
  • Add authz of audited records
  • Test the MFA reset action itself
  • Add base action that has validation hooks, handles auditing, etc
  • Look into replacing auditing logic with something that can capture multiple save calls

The UI flow:

Step 1, find the user in Avo

image

Step 2, visit the user page and use the Action menu to choose "Reset 2FA"

image

Step 3, fill out the explanation

image

Step 4, you're done and here is the audit log entry

image

@codecov
Copy link

codecov bot commented Feb 10, 2023

Codecov Report

Merging #3426 (898e617) into master (86b31eb) will increase coverage by 0.08%.
The diff coverage is 98.70%.

@@            Coverage Diff             @@
##           master    #3426      +/-   ##
==========================================
+ Coverage   97.77%   97.86%   +0.08%     
==========================================
  Files         145      156      +11     
  Lines        3866     4021     +155     
==========================================
+ Hits         3780     3935     +155     
  Misses         86       86              
Impacted Files Coverage Δ
...nts/avo/fields/json_viewer_field/show_component.rb 66.66% <66.66%> (ø)
app/policies/audit_policy.rb 90.00% <90.00%> (ø)
app/avo/actions/base_action.rb 100.00% <100.00%> (ø)
app/avo/actions/reset_user_2fa.rb 100.00% <100.00%> (ø)
app/avo/fields/audited_changes_field.rb 100.00% <100.00%> (ø)
app/avo/fields/json_viewer_field.rb 100.00% <100.00%> (ø)
app/avo/resources/audit_resource.rb 100.00% <100.00%> (ø)
app/avo/resources/user_resource.rb 97.72% <100.00%> (+0.16%) ⬆️
.../avo/audited_changes_record_diff/show_component.rb 100.00% <100.00%> (ø)
...avo/fields/audited_changes_field/show_component.rb 100.00% <100.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@segiddins segiddins force-pushed the segiddins/mfa-reset-action-audit-view branch from d1cc1db to 133aa36 Compare February 12, 2023 00:47
@segiddins segiddins force-pushed the segiddins/mfa-reset-action-audit-view branch from 133aa36 to 1ce17fc Compare February 13, 2023 06:41
@segiddins segiddins marked this pull request as ready for review February 13, 2023 06:51
@segiddins segiddins mentioned this pull request Feb 13, 2023
6 tasks
@indirect
Copy link
Member

indirect commented Feb 14, 2023

@segiddins this is really good!

Let's adjust the Audit show page a bit so it's clearer what's happening:

  • Change "Auditable" to "Edited Record"
  • Move changed fields to the top inside "Audited Changes"
  • Move the "action information" fields to the bottom or to the side
  • Shrink the gravatar so it's not taking up so much screen space. Maybe half that height?

@segiddins
Copy link
Member Author

image
new look to the audit log entry page

Copy link
Member

@indirect indirect left a comment

Choose a reason for hiding this comment

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

Okay, this looks good to me!

@segiddins segiddins merged commit afe6978 into rubygems:master Feb 14, 2023
@segiddins segiddins deleted the segiddins/mfa-reset-action-audit-view branch February 14, 2023 21:07
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.

2 participants