Skip to content

Limit audit events controller to 31 days date range

What does this MR do and why?

On audit events page user can change the date range params and query for more than 31 days which is the restriction on frontend. This MR enforces maximum date range of 31 days on backend.

Screenshots or screen recordings

page Screenshot
admin/audit_logs Screenshot_2022-03-17_at_2.17.47_PM
project_path/-/audit_events Screenshot_2022-03-17_at_2.16.41_PM
group_path/-/audit_events Screenshot_2022-03-17_at_2.17.19_PM

How to set up and validate locally

  1. Run GDK.
  2. Visit admin/audit_logs page.
  3. Change params manually making date range greater than 31 days.
  4. You should see alert stating "Date range limited to 31 days"
  5. repeat steps 3 and 4 for projects > audit_events page and group > audit_events page.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #345371 (closed)

Edited by Harsimar Sandhu

Merge request reports

Loading