Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix incorrect message/error for instrument access #8284

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions php/libraries/NDB_BVL_Instrument.class.inc
Expand Up @@ -362,10 +362,18 @@ abstract class NDB_BVL_Instrument extends NDB_Page
} else { //check if user has instrument's permissions
//is the instrument listed at all in instrumentPermissions?
$instrumentListed = false;
foreach ($instrumentPermissions["instrument"] as $instrument) {
// get an array of instruments
// if one instrument, get it into an array
$instrumentList = Utility::asArray(
$instrumentPermissions["instrument"]
);
// iterate through instruments
foreach ($instrumentList as $instrument) {
if ($instrument["Test_name"] == $this->testName) {
$instrumentListed = true;
$instrumentPerms = Utility::asArray($instrument["permission"]);
$instrumentPerms = Utility::asArray(
$instrument["permission"]
);
}
}

Expand Down