4 include_once
'./Services/CAS/classes/class.ilCASSettings.php';
37 $this->tabs_gui = $ilTabs;
39 $this->lng->loadLanguageModule(
'registration');
40 $this->lng->loadLanguageModule(
'auth');
43 $this->ref_id = $a_auth_ref_id;
68 $next_class = $this->ctrl->getNextClass($this);
69 $cmd = $this->ctrl->getCmd(
"settings");
71 if(!$ilAccess->checkAccess(
'read',
'',$this->ref_id))
73 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_write'),$ilErr->WARNING);
76 if(!$ilAccess->checkAccess(
'write',
'',$this->ref_id) &&
$cmd !=
"settings")
79 $ilCtrl->redirect($this,
"settings");
103 $this->lng->loadLanguageModule(
'auth');
104 $this->lng->loadLanguageModule(
'radius');
106 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
108 $form->setFormAction($this->ctrl->getFormAction($this));
110 $form->setTitle($this->lng->txt(
'auth_cas_auth'));
111 $form->setDescription($this->lng->txt(
"auth_cas_auth_desc"));
117 $form->addItem($check);
121 $text->setRequired(
true);
122 $text->setInfo($this->lng->txt(
'auth_cas_server_desc'));
124 $text->setMaxLength(255);
125 $form->addItem($text);
129 $port->setRequired(
true);
130 $port->setMinValue(0);
131 $port->setMaxValue(65535);
133 $port->setMaxLength(5);
134 $port->setInfo($this->lng->txt(
'auth_cas_port_desc'));
135 $form->addItem($port);
139 $text->setRequired(
true);
140 $text->setInfo($this->lng->txt(
'auth_cas_uri_desc'));
142 $text->setMaxLength(255);
143 $form->addItem($text);
151 #$sync->setInfo($this->lng->txt('auth_radius_sync_info'));
152 $form->addItem($sync);
156 $this->lng->txt(
'disabled'),
160 #$dis->setInfo($this->lng->txt('auth_radius_sync_disabled_info'));
161 $sync->addOption($dis);
165 $this->lng->txt(
'auth_sync_cas'),
169 $rad->
setInfo($this->lng->txt(
'auth_sync_cas_info'));
170 $sync->addOption($rad);
172 $select =
new ilSelectInputGUI($this->lng->txt(
'auth_user_default_role'),
'role');
174 $select->setValue($this->
getSettings()->getDefaultRole());
175 $rad->addSubItem($select);
180 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
183 if(count($server_ids))
186 $this->lng->txt(
'auth_radius_ldap'),
190 $ldap->
setInfo($this->lng->txt(
'auth_radius_ldap_info'));
191 $sync->addOption($ldap);
198 $sync->setValue(self::SYNC_LDAP);
209 $instruction =
new ilTextAreaInputGUI($this->lng->txt(
'auth_login_instructions'),
'instruction');
211 $instruction->setRows(6);
212 $instruction->setValue($this->
getSettings()->getLoginInstruction());
213 $form->addItem($instruction);
216 $create->
setInfo($this->lng->txt(
'auth_cas_allow_local_desc'));
217 $create->setChecked($this->
getSettings()->isLocalAuthenticationEnabled() ?
true :
false);
218 $create->setValue(1);
219 $form->addItem($create);
221 $form->addCommandButton(
'save',$this->lng->txt(
'save'));
236 $this->tpl->setContent($form->getHTML());
249 if($form->checkInput())
251 $this->
getSettings()->setActive($form->getInput(
'active'));
252 $this->
getSettings()->setServer($form->getInput(
'server'));
253 $this->
getSettings()->setPort($form->getInput(
'port'));
254 $this->
getSettings()->setUri($form->getInput(
'uri'));
255 $this->
getSettings()->setDefaultRole($form->getInput(
'role'));
256 $this->
getSettings()->enableLocalAuthentication($form->getInput(
'local'));
257 $this->
getSettings()->setLoginInstruction($form->getInput(
'instruction'));
261 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
262 switch((
int) $form->getInput(
'sync'))
280 $this->ctrl->redirect($this,
'settings');
283 $form->setValuesByPost();
285 $this->tpl->setContent($form->getHTML());
292 global $rbacreview,$ilObjDataCache;
299 $select[0] = $this->lng->txt(
'links_select_one');
300 foreach($global_roles as $role_id)