greenlight icon indicating copy to clipboard operation
greenlight copied to clipboard

ManageRoles Permission

Open hadicheaito1 opened this issue 2 years ago • 1 comments

Description

  • Adding check for ManageRoles permission before accessing roles endpoints
  • Added rspec tests to check for forbidden status return
  • Removes the Roles tab from AdminNavSideBar if current user doesn't have permission

Testing Steps

Screenshots (if appropriate):

hadicheaito1 avatar Aug 10 '22 15:08 hadicheaito1

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 14 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 80 Code Smells

No Coverage information No Coverage information
1.6% 1.6% Duplication

sonarqubecloud[bot] avatar Aug 16 '22 20:08 sonarqubecloud[bot]

If possible, let us try to be consistent with the spec template introduced by @scouillard ,

@KH-Amir-TN This is following the same template. The only difference is that it is using the context to remove the permission instead since most of the tests in the file require the permission. We agreed that it what we will do in this case

hadicheaito1 avatar Aug 17 '22 15:08 hadicheaito1

If possible, let us try to be consistent with the spec template introduced by @scouillard ,

@KH-Amir-TN This is following the same template. The only difference is that it is using the context to remove the permission instead since most of the tests in the file require the permission. We agreed that it what we will do in this case

Gotcha, My bad, I didn't pay enough attention 😅

KH-Amir-TN avatar Aug 17 '22 15:08 KH-Amir-TN