4 include_once
'./Services/OpenId/classes/class.ilOpenIdSettings.php';
31 $this->ref_id = $a_ref_id;
35 $this->lng->loadLanguageModule(
'auth');
47 if(!$ilAccess->checkAccess(
'read',
'',$this->getRefId()))
49 $ilErr->raiseError($lng->txt(
'msg_no_perm_read'),$ilErr->WARNING);
51 switch($this->ctrl->getNextClass($this))
54 if(!
$cmd = $this->ctrl->getCmd())
72 $ilTabs->addSubTabTarget(
73 "auth_openid_settings",
74 $this->ctrl->getLinkTarget($this,
'settings')
76 $ilTabs->addSubTabTarget(
77 'auth_openid_provider',
78 $this->ctrl->getLinkTarget($this,
'provider')
100 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
102 $tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.openid_settings.html',
'Services/OpenId');
105 $ilTabs->setSubTabActive(
'auth_openid_settings');
108 $this->form->setTableWidth(
'75%');
109 $this->form->setFormAction($this->ctrl->getFormAction($this,
'save'));
111 $this->form->setTitle($this->lng->txt(
'auth_openid_configure'));
117 $this->form->addItem($check);
120 $sel =
new ilCheckboxInputGUI($this->lng->txt(
'auth_openid_uncontrolled_selection'),
'free');
123 $sel->setInfo($this->lng->txt(
'auth_openid_uncontrolled_selection_info'));
124 $this->form->addItem($sel);
128 $check->
setInfo($this->lng->txt(
'auth_openid_sync_info'));
129 $check->setChecked($this->
settings->isCreationEnabled() ? 1 : 0);
133 $select =
new ilSelectInputGUI($this->lng->txt(
'auth_openid_role_select'),
'role');
135 $select->setValue($this->
settings->getDefaultRole());
136 $check->addSubItem($select);
139 $migr->
setInfo($this->lng->txt(
'auth_openid_migration_info'));
140 $migr->setChecked($this->
settings->isAccountMigrationEnabled() ? 1 : 0);
142 $check->addSubItem($migr);
143 $this->form->addItem($check);
145 $this->form->addCommandButton(
'save',$this->lng->txt(
'save'));
147 $tpl->setVariable(
'SETTINGS_FORM',$this->form->getHTML());
159 $this->
settings->forceProviderSelection((
int) !$_POST[
'free']);
160 $this->
settings->enableCreation((
int) $_POST[
'sync']);
161 $this->
settings->enableAccountMigration((
int) $_POST[
'migration']);
162 $this->
settings->setDefaultRole((
int) $_POST[
'role']);
166 $this->ctrl->redirect($this,
'settings');
179 $ilTabs->setSubTabActive(
'auth_openid_provider');
181 include_once
'./Services/OpenId/classes/class.ilOpenIdProviderTableGUI.php';
185 $GLOBALS[
'tpl']->setContent($table->getHTML());
195 if(!isset(
$_POST[
'provider_ids']) or !
$_POST[
'provider_ids'])
208 $this->ctrl->redirect($this,
'provider');
220 $ilTabs->setSubTabActive(
'auth_openid_provider');
224 $this->tpl->setContent($this->form->getHTML());
236 $ilTabs->setSubTabActive(
'auth_openid_provider');
238 $this->ctrl->setParameter($this,
'provider_id',
$_GET[
'provider_id']);
242 $this->tpl->setContent($this->form->getHTML());
256 if(!$this->form->checkInput())
258 $this->form->setValuesByPost();
260 $tpl->setContent($this->form->getHTML());
266 $this->ctrl->redirect($this,
'provider');
280 if(!$this->form->checkInput())
282 $this->form->setValuesByPost();
284 $tpl->setContent($this->form->getHTML());
290 $this->ctrl->redirect($this,
'provider');
300 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
302 $this->form->setFormAction($this->ctrl->getFormAction($this,
'provider'));
303 $this->form->setTableWidth(
'75%');
308 $this->form->setTitle($this->lng->txt(
'auth_openid_provider_edit'));
309 $this->form->addCommandButton(
'updateProvider', $this->lng->txt(
'save'));
310 $this->form->addCommandButton(
'provider', $this->lng->txt(
'cancel'));
314 $this->form->setTitle($this->lng->txt(
'auth_openid_provider_add'));
315 $this->form->addCommandButton(
'createProvider', $this->lng->txt(
'btn_add'));
316 $this->form->addCommandButton(
'provider', $this->lng->txt(
'cancel'));
321 $title->setRequired(
true);
322 $title->setMaxLength(128);
325 $this->form->addItem(
$title);
329 $url->setRequired(
true);
330 $url->setMaxLength(255);
332 $url->setInfo($this->lng->txt(
'auth_openid_url_info'));
333 $url->setValue($this->
provider->getURL());
334 $this->form->addItem($url);
344 include_once
'./Services/OpenId/classes/class.ilOpenIdProvider.php';
355 $this->
provider->setName($this->form->getInput(
'title'));
356 $this->
provider->setURL($this->form->getInput(
'url'));
367 global $rbacreview,$ilObjDataCache;
374 $select[0] = $this->lng->txt(
'links_select_one');
375 foreach($global_roles as $role_id)