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)) {
55 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_write'), $ilErr->WARNING);
58 if (!$ilAccess->checkAccess(
'write',
'', $this->ref_id) && $cmd !=
"settings") {
60 $ilCtrl->redirect($this,
"settings");
64 switch ($next_class) {
84 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
86 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.settings.html',
'Services/Radius');
88 $this->lng->loadLanguageModule(
'auth');
91 $form->setFormAction($this->ctrl->getFormAction($this));
92 $form->setTitle($this->lng->txt(
'auth_radius_configure'));
98 $form->addItem($check);
101 $text->setRequired(
true);
102 $text->setInfo($this->lng->txt(
'auth_radius_name_desc'));
105 $text->setMaxLength(64);
109 $text->setRequired(
true);
110 $text->setInfo($this->lng->txt(
'auth_radius_server_desc'));
113 $text->setMaxLength(255);
118 $text->setRequired(
true);
121 $text->setMaxLength(5);
125 $text->setRequired(
true);
128 $text->setMaxLength(32);
131 $encoding =
new ilSelectInputGUI($this->lng->txt(
'auth_radius_charset'),
'charset');
134 $encoding->setValue($this->
settings->getCharset());
135 $encoding->setInfo($this->lng->txt(
'auth_radius_charset_info'));
136 $form->addItem($encoding);
143 $sync->setRequired(
true);
144 #$sync->setInfo($this->lng->txt('auth_radius_sync_info')); 149 $this->lng->txt(
'disabled'),
153 #$dis->setInfo($this->lng->txt('auth_radius_sync_disabled_info')); 154 $sync->addOption($dis);
158 $this->lng->txt(
'auth_radius_sync_rad'),
162 $rad->
setInfo($this->lng->txt(
'auth_radius_sync_rad_info'));
163 $sync->addOption($rad);
165 $select =
new ilSelectInputGUI($this->lng->txt(
'auth_radius_role_select'),
'role');
167 $select->setValue($this->
settings->getDefaultRole());
168 $rad->addSubItem($select);
171 $migr->
setInfo($this->lng->txt(
'auth_rad_migration_info'));
172 $migr->setChecked($this->
settings->isAccountMigrationEnabled() ? 1 : 0);
174 $rad->addSubItem($migr);
177 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
180 if (count($server_ids)) {
182 $this->lng->txt(
'auth_radius_ldap'),
186 $ldap->
setInfo($this->lng->txt(
'auth_radius_ldap_info'));
187 $sync->addOption($ldap);
189 $ldap_server_select =
new ilSelectInputGUI($this->lng->txt(
'auth_ldap_server_ds'),
'ldap_sid');
190 $options[0] = $this->lng->txt(
'select_one');
191 foreach ($server_ids as $ldap_sid) {
193 $options[$ldap_sid] = $ldap_server->getName();
196 $ldap_server_select->setRequired(
true);
198 $ldap_server_select->setValue($ds);
200 $ldap->addSubItem($ldap_server_select);
207 $this->
settings->enabledCreation() ?
213 $form->addCommandButton(
'save', $this->lng->txt(
'save'));
214 $this->tpl->setVariable(
'SETTINGS_TABLE',
$form->getHTML());
230 $this->
settings->setDefaultRole((
int) $_POST[
'role']);
231 $this->
settings->enableAccountMigration((
int) $_POST[
'migration']);
232 $this->
settings->setCharset((
int) $_POST[
'charset']);
235 if (!$this->
settings->validateRequired()) {
240 if (!$this->
settings->validatePort()) {
245 if (!$this->
settings->validateServers()) {
251 include_once
'./Services/LDAP/classes/class.ilLDAPServer.php';
252 switch ((
int) $_POST[
'sync']) {
262 if (!(
int) $_REQUEST[
'ldap_sid']) {
287 include_once(
'Services/Radius/classes/class.ilRadiusSettings.php');
293 global $rbacreview,$ilObjDataCache;
296 $rbacreview->getGlobalRoles(),
302 $select[0] = $this->lng->txt(
'links_select_one');
303 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(isset($_POST['submit'])) $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,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.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
static toggleDataSource($a_ldap_server_id, $a_auth_mode, $a_status)
Toggle Data Source.