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);
193 $ldap_server_select =
new ilSelectInputGUI($this->lng->txt(
'auth_ldap_server_ds'),
'ldap_sid');
194 $options[0] = $this->lng->txt(
'select_one');
195 foreach($server_ids as $ldap_sid)
198 $options[$ldap_sid] = $ldap_server->getName();
201 $ldap_server_select->setRequired(
true);
203 $ldap_server_select->setValue($ds);
205 $ldap->addSubItem($ldap_server_select);
221 $instruction =
new ilTextAreaInputGUI($this->lng->txt(
'auth_login_instructions'),
'instruction');
223 $instruction->setRows(6);
224 $instruction->setValue($this->
getSettings()->getLoginInstruction());
225 $form->addItem($instruction);
228 $create->
setInfo($this->lng->txt(
'auth_cas_allow_local_desc'));
229 $create->setChecked($this->
getSettings()->isLocalAuthenticationEnabled() ?
true :
false);
230 $create->setValue(1);
231 $form->addItem($create);
233 $form->addCommandButton(
'save',$this->lng->txt(
'save'));
248 $this->tpl->setContent($form->getHTML());
261 if($form->checkInput())
263 $this->
getSettings()->setActive($form->getInput(
'active'));
264 $this->
getSettings()->setServer($form->getInput(
'server'));
265 $this->
getSettings()->setPort($form->getInput(
'port'));
266 $this->
getSettings()->setUri($form->getInput(
'uri'));
267 $this->
getSettings()->setDefaultRole($form->getInput(
'role'));
268 $this->
getSettings()->enableLocalAuthentication($form->getInput(
'local'));
269 $this->
getSettings()->setLoginInstruction($form->getInput(
'instruction'));
273 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
274 switch((
int) $form->getInput(
'sync'))
285 if(!(
int) $_REQUEST[
'ldap_sid'])
297 $this->ctrl->redirect($this,
'settings');
300 $form->setValuesByPost();
302 $this->tpl->setContent($form->getHTML());
309 global $rbacreview,$ilObjDataCache;
316 $select[0] = $this->lng->txt(
'links_select_one');
317 foreach($global_roles as $role_id)
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
This class represents an option in a radio group.
static getAvailableDataSources($a_auth_mode)
static _lookupTitle($a_id)
lookup object title
setInfo($a_info)
Set Info.
static disableDataSourceForAuthMode($a_authmode)
Disable data source.
__construct($a_auth_ref_id)
Constructor.
static isDataSourceActive($a_auth_mode)
Check if a data source is active for a specific auth mode ilDB $ilDB.
if(!is_array($argv)) $options
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,7),'usr_data','lastname','usr_id') => sorts by lastname.
executeCommand()
Execute command.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
static getDataSource($a_auth_mode)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
This class represents a text area property in a property form.
initFormSettings()
Init cas settings.
static getInstance()
Get singleton instance.
static toggleDataSource($a_ldap_server_id, $a_auth_mode, $a_status)
Toggle Data Source.