Skip to content

Hide "New issue" button from Auditors on empty project issues page

📖 What does this MR do?

Related to #324971 (closed)

Hides "New issue" button from Auditors on "Project" -> "Issues" page when no issues are present. Auditors have read-only access to all projects on the GitLab instance so clicking that button returns a 404.

💻 Local testing

  1. Log in with an admin account (root)
  2. Navigate to /admin/users/new
  3. Fill out required fields and choose "Auditor" in the "Access level"
  4. Create a new project
  5. Log out and then log in with newly create Auditor account
  6. Navigate to newly created project -> "Issues"

📷 Screenshots

View Before After
Auditor that is not a member of project Screen_Shot_2021-03-18_at_10.48.14_AM Screen_Shot_2021-03-18_at_10.43.24_AM

Below screenshots should be the same

View Before After
Auditor that is member of project Screen_Shot_2021-03-18_at_10.48.28_AM Screen_Shot_2021-03-18_at_10.43.53_AM
Normal user that is member of project Screen_Shot_2021-03-18_at_10.50.05_AM Screen_Shot_2021-03-18_at_10.40.43_AM
Logged out user Screen_Shot_2021-03-18_at_10.50.23_AM Screen_Shot_2021-03-18_at_10.42.43_AM

🚦 Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Peter Hegman

Merge request reports

Loading