Skip to content

Commit

Permalink
optional check for vhb access
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Neumann committed Apr 28, 2021
1 parent 31b7647 commit af3e180
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions classes/class.ilVhbShibAuthConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ public function __construct($a_plugin_object)
'Einstellungen zum Anlegen und Auffinden von Benutzerkonten',
ilVhbShibAuthParam::TYPE_HEAD
);

$params[] = ilVhbShibAuthParam::_create(
'check_vhb_access',
'vhb-Zugriffsrecht prüfen',
'Prüft, ob das Shibboleth-Attribut "eduPersonEntitlement" die Zeichenkette "urn:mace:vhb.org:entitlement:vhb-access" enthält. Nur mit dieser erhalten Nutzer/-innen Zugriff.',
ilVhbShibAuthParam::TYPE_BOOLEAN
);

$params[] = ilVhbShibAuthParam::_create(
'local_user_suffix',
'Suffix bei lokalen Benutzern',
Expand Down
2 changes: 1 addition & 1 deletion classes/class.ilVhbShibAuthMatching.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function checkAccess(ilVhbShibAuthUser $user)
/** @var ilErrorHandling $ilErr */
$ilErr = $DIC['ilErr'];

if (!$this->hasVhbAccess()) {
if ($this->config->get('check_vhb_access') && !$this->hasVhbAccess()) {
$ilErr->raiseError($this->plugin->txt('err_no_vhb_access'));
}

Expand Down

0 comments on commit af3e180

Please sign in to comment.