Fix the wiki FPCA requirement
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
parent
911bb8ac4f
commit
7c03fc1954
1 changed files with 7 additions and 3 deletions
|
@ -166,14 +166,18 @@ class OpenIDConnect extends PluggableAuth {
|
|||
wfDebugLog( 'OpenID Connect', 'Redirect URL: ' . $redirectURL );
|
||||
if ( $oidc->authenticate() ) {
|
||||
|
||||
if(in_array($oidc->requestUserInfo('agreements'), "FPCA")) {
|
||||
if(!in_array("signed_fpca", $oidc->requestUserInfo('groups'))) {
|
||||
$errorMessage = 'You need to have signed the FPCA';
|
||||
return false;
|
||||
}
|
||||
if(count($oidc->requestUserInfo('groups')) < 1) {
|
||||
$errorMessage = 'You need to have signed the FPCA+1 group';
|
||||
/*
|
||||
* Enable the following block to require the equivalent of CLA+1
|
||||
*
|
||||
if(!in_array("fedora-contributor", $oidc->requestUserInfo('groups'))) {
|
||||
$errorMessage = 'You need to be in at least one group';
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
$realname = $oidc->requestUserInfo( 'name' );
|
||||
$email = $oidc->requestUserInfo( 'email' );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue