4include_once 
'./Services/CAS/classes/class.ilCASSettings.php';
 
   41        $this->ctrl = $this->dic->ctrl();
 
   42        $this->tabs_gui = $this->dic->tabs();
 
   43        $this->lng = $this->dic->language();
 
   44        $this->lng->loadLanguageModule(
'registration');
 
   45        $this->lng->loadLanguageModule(
'auth');
 
   47        $this->tpl = $this->dic[
'tpl'];
 
   48        $this->ref_id = $a_auth_ref_id;
 
   73        $next_class = $this->ctrl->getNextClass($this);
 
   74        $cmd = $this->ctrl->getCmd(
"settings");
 
   76        if (!$this->dic->rbac()->system()->checkAccess(
"visible,read", $this->ref_id)) {
 
   77            $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'), 
$ilErr->WARNING);
 
   80        switch ($next_class) {
 
   97        $this->lng->loadLanguageModule(
'auth');
 
   98        $this->lng->loadLanguageModule(
'radius');
 
  100        include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  102        $form->setFormAction($this->ctrl->getFormAction($this));
 
  104        $form->setTitle($this->lng->txt(
'auth_cas_auth'));
 
  105        $form->setDescription($this->lng->txt(
"auth_cas_auth_desc"));
 
  109        $check->setChecked($this->
getSettings()->isActive() ? 
true : 
false);
 
  111        $form->addItem($check);
 
  114        $text->setValue($this->
getSettings()->getServer());
 
  115        $text->setRequired(
true);
 
  116        $text->setInfo($this->lng->txt(
'auth_cas_server_desc'));
 
  118        $text->setMaxLength(255);
 
  119        $form->addItem($text);
 
  123        $port->setRequired(
true);
 
  124        $port->setMinValue(0);
 
  125        $port->setMaxValue(65535);
 
  127        $port->setMaxLength(5);
 
  128        $port->setInfo($this->lng->txt(
'auth_cas_port_desc'));
 
  129        $form->addItem($port);
 
  133        $text->setRequired(
true);
 
  134        $text->setInfo($this->lng->txt(
'auth_cas_uri_desc'));
 
  136        $text->setMaxLength(255);
 
  137        $form->addItem($text);
 
  144        $sync->setRequired(
true);
 
  145        #$sync->setInfo($this->lng->txt('auth_radius_sync_info')); 
  146        $form->addItem($sync);
 
  150            $this->lng->txt(
'disabled'),
 
  154        #$dis->setInfo($this->lng->txt('auth_radius_sync_disabled_info')); 
  155        $sync->addOption($dis);
 
  159            $this->lng->txt(
'auth_sync_cas'),
 
  163        $rad->setInfo($this->lng->txt(
'auth_sync_cas_info'));
 
  164        $sync->addOption($rad);
 
  166        $select = 
new ilSelectInputGUI($this->lng->txt(
'auth_user_default_role'), 
'role');
 
  168        $select->setValue($this->
getSettings()->getDefaultRole());
 
  169        $rad->addSubItem($select);
 
  174        include_once 
'./Services/LDAP/classes/class.ilLDAPServer.php';
 
  177        if (count($server_ids)) {
 
  179                $this->lng->txt(
'auth_radius_ldap'),
 
  183            $ldap->setInfo($this->lng->txt(
'auth_radius_ldap_info'));
 
  184            $sync->addOption($ldap);
 
  186            $ldap_server_select = 
new ilSelectInputGUI($this->lng->txt(
'auth_ldap_server_ds'), 
'ldap_sid');
 
  187            $options[0] = $this->lng->txt(
'select_one');
 
  188            foreach ($server_ids as $ldap_sid) {
 
  190                $options[$ldap_sid] = $ldap_server->getName();
 
  192            $ldap_server_select->setOptions($options);
 
  193            $ldap_server_select->setRequired(
true);
 
  195            $ldap_server_select->setValue($ds);
 
  197            $ldap->addSubItem($ldap_server_select);
 
  210        $instruction = 
new ilTextAreaInputGUI($this->lng->txt(
'auth_login_instructions'), 
'instruction');
 
  211        $instruction->setCols(80);
 
  212        $instruction->setRows(6);
 
  213        $instruction->setValue($this->
getSettings()->getLoginInstruction());
 
  214        $form->addItem($instruction);
 
  217        $create->setInfo($this->lng->txt(
'auth_cas_allow_local_desc'));
 
  218        $create->setChecked($this->
getSettings()->isLocalAuthenticationEnabled() ? 
true : 
false);
 
  219        $create->setValue(1);
 
  220        $form->addItem($create);
 
  222        if ($this->dic->rbac()->system()->checkAccess(
'write', $this->ref_id)) {
 
  223            $form->addCommandButton(
'save', $this->lng->txt(
'save'));
 
  239        $this->tpl->setContent($form->getHTML());
 
  252        if ($form->checkInput()) {
 
  253            $this->
getSettings()->setActive($form->getInput(
'active'));
 
  254            $this->
getSettings()->setServer($form->getInput(
'server'));
 
  255            $this->
getSettings()->setPort($form->getInput(
'port'));
 
  256            $this->
getSettings()->setUri($form->getInput(
'uri'));
 
  257            $this->
getSettings()->setDefaultRole($form->getInput(
'role'));
 
  258            $this->
getSettings()->enableLocalAuthentication($form->getInput(
'local'));
 
  259            $this->
getSettings()->setLoginInstruction($form->getInput(
'instruction'));
 
  263            include_once 
'./Services/LDAP/classes/class.ilLDAPServer.php';
 
  264            switch ((
int) $form->getInput(
'sync')) {
 
  274                    if (!(
int) $_REQUEST[
'ldap_sid']) {
 
  284            ilUtil::sendSuccess($this->lng->txt(
'settings_saved'), 
true);
 
  285            $this->ctrl->redirect($this, 
'settings');
 
  288        $form->setValuesByPost();
 
  290        $this->tpl->setContent($form->getHTML());
 
  297        global $rbacreview,$ilObjDataCache;
 
  300            $rbacreview->getGlobalRoles(),
 
  306        $select[0] = $this->lng->txt(
'links_select_one');
 
  307        foreach ($global_roles as $role_id) {
 
An exception for terminatinating execution or to throw for unit testing.
executeCommand()
Execute command.
__construct($a_auth_ref_id)
Constructor.
initFormSettings()
Init cas settings.
static getInstance()
Get singleton instance.
static getDataSource($a_auth_mode)
static disableDataSourceForAuthMode($a_authmode)
Disable data source.
static isDataSourceActive($a_auth_mode)
Check if a data source is active for a specific auth mode @global ilDB $ilDB.
static toggleDataSource($a_ldap_server_id, $a_auth_mode, $a_status)
Toggle Data Source.
static getAvailableDataSources($a_auth_mode)
static _lookupTitle($a_id)
lookup object title
This class represents an option in a radio group.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static _sortIds($a_ids, $a_table, $a_field, $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.