Filter bar missing for developers in audit events

Summary

When a user with Developer access visits the Audit Event page, they are not able to see the filter bar anymore.

This is no longer the case, but we should still render the input as view-only. As noted in #344452 (comment 1109195506):

In !82195 (diffs) a typebug was introduced that makes showFilter always return true making it always render. That doesn't fix this SUS bug tho, because the filter is editable which shouldn't be case. The filter should be view-only for users who do not have permission to other users' audit events.

Steps to reproduce

Visit any project or group with GitLab Premium as a Developer and go to the Audit Events page

Example Project

GitLab Audit Events, if you are a developer

What is the current bug behavior?

The filter bar will be missing for the Developer role.

What is the expected correct behavior?

The filter bar should be present regardless of role.

Relevant logs and/or screenshots

image

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

frontend

  1. When a Developer views the project or group audit events:
    1. Show the filtered search component.
    2. Add a token for the current user.
    3. Set readonly to true on the filtered search. gitlab-ui#1699 (closed)
Edited by Jiaan Louw