This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.  
 More...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilAuthShibbolethSettingsGUI
- Author
 - Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om 
 
- 
Fabian Schmid fabia.nosp@m.n.sc.nosp@m.hmid@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch 
 
- Version
 - $Id$ 
 
Definition at line 27 of file class.ilAuthShibbolethSettingsGUI.php.
 
◆ __construct()
      
        
          | ilAuthShibbolethSettingsGUI::__construct  | 
          ( | 
          int  | 
          $a_auth_ref_id | ) | 
           | 
        
      
 
 
◆ addRoleAssignmentRule()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::addRoleAssignmentRule  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 268 of file class.ilAuthShibbolethSettingsGUI.php.
References ILIAS\Repository\access(), checkInput(), ILIAS\Repository\form(), initFormRoleAssignment(), ILIAS\Repository\lng(), parseRulesTable(), and roleAssignment().
  270         if (!$this->
access->checkAccess(
'write', 
'', $this->ref_id)) {
   271             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'), 
true);
   279                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt($err));
   281             $this->tabs_gui->setSubTabActive(
'shib_role_assignment');
   282             $this->
form->setValuesByPost();
   283             $this->tpl->addBlockFile(
   286                 'tpl.shib_role_assignment.html',
   287                 'Services/AuthShibboleth'   289             $this->tpl->setVariable(
'NEW_RULE_TABLE', $this->
form->getHTML());
   291                 $this->tpl->setVariable(
'RULE_TABLE', $html);
   297         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'));
 
initFormRoleAssignment(string $a_mode='default')
 
form( $class_path, string $cmd, string $submit_caption="")
 
 
 
 
◆ addRoleAutoCompleteObject()
      
        
          | ilAuthShibbolethSettingsGUI::addRoleAutoCompleteObject  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ checkInput()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::checkInput  | 
          ( | 
            | 
          $a_rule_id = 0 | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ confirmDeleteRules()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::confirmDeleteRules  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 140 of file class.ilAuthShibbolethSettingsGUI.php.
References ilObject\_lookupTitle(), ilShibbolethRoleAssignmentRule\conditionToString(), ILIAS\Repository\ctrl(), ilShibbolethRoleAssignmentRule\getRoleId(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and roleAssignment().
  142         if (!$this->wrapper->post()->has(
'rule_ids')) {
   143             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'));
   148         $this->tabs_gui->setSubTabActive(
'shib_role_assignment');
   151         $c_gui->setFormAction($this->
ctrl->getFormAction($this, 
"deleteRules"));
   152         $c_gui->setHeaderText($this->
lng->txt(
"shib_confirm_del_role_ass"));
   153         $c_gui->setCancel($this->
lng->txt(
"cancel"), 
"roleAssignment");
   154         $c_gui->setConfirm($this->
lng->txt(
"confirm"), 
"deleteRules");
   156         $rule_ids = $this->wrapper->post()->retrieve(
   160         foreach ($rule_ids as $rule_id) {
   166             $c_gui->addItem(
'rule_ids[]', $rule_id, $info);
   168         $this->tpl->setContent($c_gui->getHTML());
 
static _lookupTitle(int $obj_id)
 
ilShibbolethRoleAssignmentRule $rule
 
Shibboleth role assignment rule. 
 
 
 
 
◆ deleteRules()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::deleteRules  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ editRoleAssignment()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::editRoleAssignment  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ executeCommand()
      
        
          | ilAuthShibbolethSettingsGUI::executeCommand  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 66 of file class.ilAuthShibbolethSettingsGUI.php.
References ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and setSubTabs().
   68         $cmd = $this->
ctrl->getCmd();
    69         if (!$this->
access->checkAccess(
'read', 
'', $this->ref_id)) {
    72         if (!$this->
access->checkAccess(
'write', 
'', $this->ref_id) && $cmd !== 
"settings") {
    73             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'msg_no_perm_write'), 
true);
    74             $this->
ctrl->redirect($this, 
"settings");
 
 
 
 
◆ getRuleValues()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::getRuleValues  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Definition at line 387 of file class.ilAuthShibbolethSettingsGUI.php.
References ilObject\_lookupTitle(), ILIAS\Repository\form(), ilShibbolethRoleAssignmentRule\getName(), ilShibbolethRoleAssignmentRule\getPluginId(), ilShibbolethRoleAssignmentRule\getRoleId(), ilShibbolethRoleAssignmentRule\getValue(), ILIAS\Repository\int(), ilShibbolethRoleAssignmentRule\isAddOnUpdateEnabled(), ilShibbolethRoleAssignmentRule\isPluginActive(), ilShibbolethRoleAssignmentRule\isRemoveOnUpdateEnabled(), ILIAS\Repository\rbac(), and ILIAS\Repository\refinery().
Referenced by editRoleAssignment().
  389         $rule_id = $this->wrapper->query()->has(self::PARAM_RULE_ID)
   390             ? $this->wrapper->query()->retrieve(self::PARAM_RULE_ID, $this->
refinery->kindlyTo()->int())
   395         if ($this->
rbac->review()->isGlobalRole($role)) {
   396             $values[
'role_name'] = 0;
   397             $values[
'role_id'] = $role;
   399             $values[
'role_name'] = 1;
   412         $this->
form->setValuesByArray($values);
 
isRemoveOnUpdateEnabled()
 
static _lookupTitle(int $obj_id)
 
form( $class_path, string $cmd, string $submit_caption="")
 
ilShibbolethRoleAssignmentRule $rule
 
Shibboleth role assignment rule. 
 
 
 
 
◆ initFormRoleAssignment()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::initFormRoleAssignment  | 
          ( | 
          string  | 
          $a_mode = 'default' | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 194 of file class.ilAuthShibbolethSettingsGUI.php.
References $id, ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ILIAS\Repository\lng(), prepareRoleSelect(), ilRadioOption\setInfo(), ilFormPropertyGUI\setRequired(), and ilRadioGroupInputGUI\setValue().
Referenced by addRoleAssignmentRule(), editRoleAssignment(), roleAssignment(), and updateRoleAssignmentRule().
  197         $this->
form->setFormAction($this->
ctrl->getFormAction($this, 
'cancel'));
   198         $this->
form->setTitle($this->
lng->txt(
'shib_role_ass_table'));
   199         if ($a_mode === 
'default') {
   200             $this->
form->setTitle($this->
lng->txt(
'shib_role_ass_table'));
   201             $this->
form->addCommandButton(
'addRoleAssignmentRule', $this->
lng->txt(
'shib_new_rule'));
   202             $this->
form->addCommandButton(
'settings', $this->
lng->txt(
'cancel'));
   204             $this->
form->setTitle($this->
lng->txt(
'shib_update_role_ass_table'));
   205             $this->
form->addCommandButton(
'updateRoleAssignmentRule', $this->
lng->txt(
'save'));
   206             $this->
form->addCommandButton(
'roleAssignment', $this->
lng->txt(
'cancel'));
   212         $role->addOption($global);
   215         $global->addSubItem($role_select);
   217         $role->addOption($local);
   219         $role_search->setSize(40);
   220         $local->addSubItem($role_search);
   221         $role->setInfo($this->
lng->txt(
'shib_role_name_info'));
   222         $this->
form->addItem($role);
   225         $update->setValue($this->
lng->txt(
'shib_check_role_assignment'));
   227         $add->setOptionTitle($this->
lng->txt(
'shib_add_missing'));
   229         $update->addSubItem($add);
   231         $remove->setOptionTitle($this->
lng->txt(
'shib_remove_deprecated'));
   232         $remove->setValue(1);
   233         $update->addSubItem($remove);
   234         $this->
form->addItem($update);
   238         $kind->setRequired(
true);
   240         $attr->
setInfo($this->
lng->txt(
'shib_attr_info'));
   243         $attr->addSubItem($name);
   244         $value = 
new ilTextInputGUI($this->
lng->txt(
'shib_attribute_value'), 
'attr_value');
   246         $attr->addSubItem($value);
   247         $kind->addOption($attr);
   248         $pl_active = $this->component_repository->getPluginSlotById(
'shibhk')->hasActivePlugins();
   250         $pl->
setInfo($this->
lng->txt(
'shib_plugin_info'));
   251         $pl->setDisabled(!$pl_active);
   253         $id->setDisabled(!$pl_active);
   255         $id->setMaxLength(3);
   256         $id->setMaxValue(999);
   258         $pl->addSubItem(
$id);
   259         $kind->addOption($pl);
   260         $this->
form->addItem($kind);
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
form( $class_path, string $cmd, string $submit_caption="")
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
 
 
 
◆ loadRule()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::loadRule  | 
          ( | 
          int  | 
          $a_rule_id = 0 | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Definition at line 355 of file class.ilAuthShibbolethSettingsGUI.php.
References $res, $rule, ILIAS\Repository\form(), ilQueryParser\QP_COMBINATION_AND, and ilQueryParser\setMinWordLength().
Referenced by checkInput().
  358         if ((
int) $this->
form->getInput(
'role_name') === 0) {
   359             $this->rule->setRoleId($this->
form->getInput(
'role_id'));
   360         } elseif ($this->
form->getInput(
'role_search')) {
   367             $object_search->setFilter(array(
'role'));
   368             $res = $object_search->performSearch();
   369             $entries = 
$res->getEntries();
   370             if (count($entries) === 1) {
   371                 $role = current($entries);
   372                 $this->rule->setRoleId($role[
'obj_id']);
   373             } elseif (count($entries) > 1) {
   374                 $this->rule->setRoleId(-1);
   377         $this->rule->setName($this->
form->getInput(
'attr_name'));
   378         $this->rule->setValue($this->
form->getInput(
'attr_value'));
   379         $this->rule->enableAddOnUpdate($this->
form->getInput(
'add_missing'));
   380         $this->rule->enableRemoveOnUpdate($this->
form->getInput(
'remove_deprecated'));
   381         $this->rule->enablePlugin((
int) $this->
form->getInput(
'kind') === 2);
   382         $this->rule->setPluginId($this->
form->getInput(
'plugin_id'));
 
setMinWordLength(int $a_length)
 
form( $class_path, string $cmd, string $submit_caption="")
 
ilShibbolethRoleAssignmentRule $rule
 
Shibboleth role assignment rule. 
 
 
 
 
◆ parseRulesTable()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::parseRulesTable  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ prepareRoleSelect()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::prepareRoleSelect  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
- Returns
 - array<int|string, string> 
 
Definition at line 425 of file class.ilAuthShibbolethSettingsGUI.php.
References ilObject\_lookupTitle(), ilUtil\_sortIds(), and ILIAS\Repository\lng().
Referenced by initFormRoleAssignment().
  427         $global_roles = 
ilUtil::_sortIds($this->rbac_review->getGlobalRoles(), 
'object_data', 
'title', 
'obj_id');
   428         $select[0] = $this->
lng->txt(
'links_select_one');
   429         foreach ($global_roles as $role_id) {
 static _lookupTitle(int $obj_id)
 
static _sortIds(array $a_ids, string $a_table, string $a_field, string $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,7),'usr_data','lastname','usr_id') => sorts by lastname. 
 
 
 
 
◆ roleAssignment()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::roleAssignment  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 108 of file class.ilAuthShibbolethSettingsGUI.php.
References ILIAS\Repository\form(), initFormRoleAssignment(), and parseRulesTable().
Referenced by addRoleAssignmentRule(), confirmDeleteRules(), deleteRules(), and updateRoleAssignmentRule().
  110         $this->tabs_gui->setSubTabActive(
'shib_role_assignment');
   112         $this->tpl->addBlockFile(
   115             'tpl.shib_role_assignment.html',
   116             'Services/AuthShibboleth'   118         $this->tpl->setVariable(
'NEW_RULE_TABLE', $this->
form->getHTML());
   120             $this->tpl->setVariable(
'RULE_TABLE', $html);
 initFormRoleAssignment(string $a_mode='default')
 
form( $class_path, string $cmd, string $submit_caption="")
 
 
 
 
◆ save()
      
        
          | ilAuthShibbolethSettingsGUI::save  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ setSubTabs()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::setSubTabs  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ settings()
      
        
          | ilAuthShibbolethSettingsGUI::settings  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ updateRoleAssignmentRule()
  
  
      
        
          | ilAuthShibbolethSettingsGUI::updateRoleAssignmentRule  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 320 of file class.ilAuthShibbolethSettingsGUI.php.
References ILIAS\Repository\access(), checkInput(), ILIAS\Repository\form(), initFormRoleAssignment(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and roleAssignment().
  322         if (!$this->
access->checkAccess(
'write', 
'', $this->ref_id)) {
   323             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'permission_denied'), 
true);
   330         $role_id = $this->wrapper->query()->retrieve(self::PARAM_RULE_ID, $this->
refinery->kindlyTo()->int());
   332         if (!$this->
form->checkInput() || $err = $this->
checkInput($role_id)) {
   334                 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt($err));
   336             $this->tabs_gui->setSubTabActive(
'shib_role_assignment');
   337             $this->
form->setValuesByPost();
   338             $this->tpl->addBlockFile(
   341                 'tpl.shib_role_assignment.html',
   342                 'Services/AuthShibboleth'   344             $this->tpl->setVariable(
'NEW_RULE_TABLE', $this->
form->getHTML());
   348         $this->rule->update();
   349         $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'settings_saved'));
 
initFormRoleAssignment(string $a_mode='default')
 
form( $class_path, string $cmd, string $submit_caption="")
 
 
 
 
◆ $access
◆ $component_repository
◆ $ctrl
  
  
      
        
          | ilCtrl ilAuthShibbolethSettingsGUI::$ctrl | 
         
       
   | 
  
private   | 
  
 
 
◆ $form
◆ $global_settings
  
  
      
        
          | ilSetting ilAuthShibbolethSettingsGUI::$global_settings | 
         
       
   | 
  
private   | 
  
 
 
◆ $lng
◆ $rbac
  
  
      
        
          | ILIAS DI RBACServices ilAuthShibbolethSettingsGUI::$rbac | 
         
       
   | 
  
private   | 
  
 
 
◆ $rbac_review
◆ $ref_id
  
  
      
        
          | int ilAuthShibbolethSettingsGUI::$ref_id | 
         
       
   | 
  
private   | 
  
 
 
◆ $refinery
  
  
      
        
          | ILIAS Refinery Factory ilAuthShibbolethSettingsGUI::$refinery | 
         
       
   | 
  
private   | 
  
 
 
◆ $rule
◆ $shib_settings
◆ $tabs_gui
  
  
      
        
          | ilTabsGUI ilAuthShibbolethSettingsGUI::$tabs_gui | 
         
       
   | 
  
private   | 
  
 
 
◆ $tpl
◆ $wrapper
  
  
      
        
          | ILIAS HTTP Wrapper WrapperFactory ilAuthShibbolethSettingsGUI::$wrapper | 
         
       
   | 
  
private   | 
  
 
 
◆ PARAM_RULE_ID
  
  
      
        
          | const ilAuthShibbolethSettingsGUI::PARAM_RULE_ID = 'rule_id' | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: