Skip to content

Commit

Permalink
Allows for groups claim to be a string or array depending on auth type
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahbyrnie committed Feb 1, 2021
1 parent fe1a66c commit e79dda7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Authentication/AuthTokens/IAMAuthToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private function getAttributesInitToken(){
die('You must login via your organisation on IRIS IAM to gain access to this site.');
}
//Don't allow access unless user is a member of the IRIS gocdb group
if(strpos($_SERVER['OIDC_CLAIM_groups'], "gocdb")===false){
if(strpos($_SERVER['OIDC_CLAIM_groups'], "gocdb")===false and in_array('gocdb', $_SERVER['OIDC_CLAIM_groups'])===false){
die('You do not belong to the correct group to gain access to this site. Please visit iris-iam.stfc.ac.uk and submit a request to join the GOCDB group. This shall be reviewed by a GOCDB admin.');
}
}
Expand Down

0 comments on commit e79dda7

Please sign in to comment.