Skip to content

Commit

Permalink
OHDSI#2925 fix to non existent permissionIdx property
Browse files Browse the repository at this point in the history
  • Loading branch information
qcaas-nhs-sjt committed Apr 11, 2024
1 parent 14ec280 commit 75817c0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/services/AuthAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ define(function(require, exports) {
url: config.api.url + 'user/me',
method: 'GET',
success: function (info, textStatus, jqXHR) {
permissions(info.permissionIdx); // read from permission index of User info
const permissionIdx = info.permissions.reduce(function(rv, x) {
key = x.permission.split(":")[0];
(rv[key] = rv[key] || []).push(x.permission);
return rv;
}, {});

permissions(permissionIdx); // read from permission index of User info
subject(info.login);
authProvider(jqXHR.getResponseHeader('x-auth-provider'));
fullName(info.name ? info.name : info.login);
Expand Down

0 comments on commit 75817c0

Please sign in to comment.