29 $this->tabs_gui = $ilTabs;
31 $this->lng->loadLanguageModule(
'registration');
32 $this->lng->loadLanguageModule(
'auth');
35 $this->ref_id = $a_auth_ref_id;
51 $next_class = $this->ctrl->getNextClass($this);
52 $cmd = $this->ctrl->getCmd(
"settings");
54 if(!$ilAccess->checkAccess(
'read',
'',$this->ref_id))
56 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_write'),$ilErr->WARNING);
59 if(!$ilAccess->checkAccess(
'write',
'',$this->ref_id) &&
$cmd !=
"settings")
62 $ilCtrl->redirect($this,
"settings");
89 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
91 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.settings.html',
'Services/Radius');
93 $this->lng->loadLanguageModule(
'auth');
96 $form->setFormAction($this->ctrl->getFormAction($this));
97 $form->setTitle($this->lng->txt(
'auth_radius_configure'));
103 $form->addItem($check);
106 $text->setRequired(
true);
107 $text->setInfo($this->lng->txt(
'auth_radius_name_desc'));
110 $text->setMaxLength(64);
111 $form->addItem(
$text);
114 $text->setRequired(
true);
115 $text->setInfo($this->lng->txt(
'auth_radius_server_desc'));
118 $text->setMaxLength(255);
119 $form->addItem(
$text);
123 $text->setRequired(
true);
126 $text->setMaxLength(5);
127 $form->addItem(
$text);
130 $text->setRequired(
true);
133 $text->setMaxLength(32);
134 $form->addItem(
$text);
136 $encoding =
new ilSelectInputGUI($this->lng->txt(
'auth_radius_charset'),
'charset');
139 $encoding->setValue($this->
settings->getCharset());
140 $encoding->setInfo($this->lng->txt(
'auth_radius_charset_info'));
141 $form->addItem($encoding);
149 #$sync->setInfo($this->lng->txt('auth_radius_sync_info')); 150 $form->addItem($sync);
154 $this->lng->txt(
'disabled'),
158 #$dis->setInfo($this->lng->txt('auth_radius_sync_disabled_info')); 159 $sync->addOption($dis);
163 $this->lng->txt(
'auth_radius_sync_rad'),
167 $rad->
setInfo($this->lng->txt(
'auth_radius_sync_rad_info'));
168 $sync->addOption($rad);
170 $select =
new ilSelectInputGUI($this->lng->txt(
'auth_radius_role_select'),
'role');
172 $select->setValue($this->
settings->getDefaultRole());
173 $rad->addSubItem($select);
176 $migr->
setInfo($this->lng->txt(
'auth_rad_migration_info'));
177 $migr->setChecked($this->
settings->isAccountMigrationEnabled() ? 1 : 0);
179 $rad->addSubItem($migr);
182 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
185 if(count($server_ids))
188 $this->lng->txt(
'auth_radius_ldap'),
192 $ldap->
setInfo($this->lng->txt(
'auth_radius_ldap_info'));
193 $sync->addOption($ldap);
195 $ldap_server_select =
new ilSelectInputGUI($this->lng->txt(
'auth_ldap_server_ds'),
'ldap_sid');
196 $options[0] = $this->lng->txt(
'select_one');
197 foreach($server_ids as $ldap_sid)
200 $options[$ldap_sid] = $ldap_server->getName();
203 $ldap_server_select->setRequired(
true);
205 $ldap_server_select->setValue($ds);
207 $ldap->addSubItem($ldap_server_select);
217 $this->
settings->enabledCreation() ?
222 $form->addCommandButton(
'save',$this->lng->txt(
'save'));
223 $this->tpl->setVariable(
'SETTINGS_TABLE',$form->getHTML());
239 $this->
settings->setDefaultRole((
int) $_POST[
'role']);
240 $this->
settings->enableAccountMigration((
int) $_POST[
'migration']);
241 $this->
settings->setCharset((
int) $_POST[
'charset']);
244 if(!$this->
settings->validateRequired())
250 if(!$this->
settings->validatePort())
256 if(!$this->
settings->validateServers())
263 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
264 switch((
int) $_POST[
'sync'])
275 if(!(
int) $_REQUEST[
'ldap_sid'])
301 include_once(
'Services/Radius/classes/class.ilRadiusSettings.php');
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.
prepareCharsetSelection()
Get charset options.
__construct($a_auth_ref_id)
Constructor.
static getAvailableDataSources($a_auth_mode)
executeCommand()
Execute command.
static _lookupTitle($a_id)
lookup object title
setInfo($a_info)
Set Info.
static disableDataSourceForAuthMode($a_authmode)
Disable data source.
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.
static _getInstance()
singleton get instance
This class represents a text property in a property form.
static getDataSource($a_auth_mode)
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
const RADIUS_CHARSET_LATIN1
const RADIUS_CHARSET_UTF8
initSettings()
Init Server settings.
static toggleDataSource($a_ldap_server_id, $a_auth_mode, $a_status)
Toggle Data Source.