All permission checks fail when permissions lack displayNames

Description

The code in the UI that checks permissions starts out by fetching the perms from the server, and making a map that records which permission names are provided. Previously, it mapped permission names to the corresponding human-readable display names. This worked fine for
testing whether a user has a permission by seeing whether the map has the relevant entry. But when the displayName is undefined, as it is in the mod-users test data (as opposed to the auth-blackbox VM), this fails – permissions are present, but undefined.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Mike Taylor April 4, 2017 at 8:23 AM

Since the permission-checking never actually uses the displayName (only its presence), we now fix this by simply mapping from permission name to the constant `true`.

I've tested this – it works.

Fixed in a4e380d540a0c7a83901099461ca6e6732075005

Done

Details

Assignee

Reporter

Labels

Priority

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created April 4, 2017 at 8:22 AM
Updated April 4, 2017 at 7:23 PM
Resolved April 4, 2017 at 7:23 PM
TestRail: Cases
TestRail: Runs