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'));
 
  101                $check->setChecked($this->
settings->isActive() ? 1 : 0);
 
  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');
 
  137                $encoding->setRequired(
true);
 
  139                $encoding->setValue($this->
settings->getCharset());
 
  140                $encoding->setInfo($this->lng->txt(
'auth_radius_charset_info'));
 
  141                $form->addItem($encoding);
 
  148                $sync->setRequired(
true);
 
  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();
 
  202                        $ldap_server_select->setOptions(
$options);
 
  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)
 
An exception for terminatinating execution or to throw for unit testing.
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.
__construct($a_auth_ref_id)
Constructor.
prepareCharsetSelection()
Get charset options.
initSettings()
Init Server settings.
executeCommand()
Execute command.
const RADIUS_CHARSET_UTF8
static _getInstance()
singleton get instance
const RADIUS_CHARSET_LATIN1
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 sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
if(!is_array($argv)) $options