Skip to content

Commit

Permalink
LIMS-1246: Use the existing all_dewars permission
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Williams committed May 29, 2024
1 parent 23abb64 commit 25a0946
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/src/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ function auth($require_staff)
{
if (sizeof(array_intersect($vis, $this->visits)))
$auth = True;
if ($this->user->hasPermission('all_shipments'))
if ($this->user->hasPermission('all_dewars'))
// allow to see anything without an id or a visit
$auth = True;
}
Expand Down
4 changes: 2 additions & 2 deletions api/src/Page/Proposal.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function _get_proposals($id = null)
$where .= " AND (shp.personid=:" . (sizeof($args) + 1) . " OR s.beamlinename in ('" . implode("','", $bls) . "'))";
array_push($args, $this->user->personId);
}
} else if ($this->user->hasPermission('all_shipments')) {
} else if ($this->user->hasPermission('all_dewars')) {
// allow to see shipments on all proposals
} else {
$where = " INNER JOIN session_has_person shp ON shp.sessionid = s.sessionid " . $where;
Expand Down Expand Up @@ -921,7 +921,7 @@ function _lookup()

$where .= " AND ses.beamlinename in ('" . implode("','", $bls) . "')";
}
} else if ($field == 'SHIPPINGID' && $this->user->hasPermission('all_shipments')) {
} else if ($field == 'SHIPPINGID' && $this->user->hasPermission('all_dewars')) {
// allow to see shipments
} else {
$where = " INNER JOIN session_has_person shp ON shp.sessionid = ses.sessionid " . $where;
Expand Down

0 comments on commit 25a0946

Please sign in to comment.