Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00034 require_once "class.ilObject.php";
00035
00036 class ilObjAuthSettings extends ilObject
00037 {
00044 function ilObjAuthSettings($a_id = 0,$a_call_by_reference = true)
00045 {
00046 $this->type = "auth";
00047 $this->ilObject($a_id,$a_call_by_reference);
00048 }
00049
00050 function checkAuthLDAP()
00051 {
00052 $settings = $this->ilias->getAllSettings();
00053
00054 if (!$settings["ldap_server"] or !$settings["ldap_basedn"] or !$settings["ldap_port"])
00055 {
00056 return false;
00057 }
00058
00059 $this->ilias->setSetting('ldap_active',true);
00060
00061 return true;
00062 }
00063
00064 function checkAuthSHIB()
00065 {
00066 $settings = $this->ilias->getAllSettings();
00067
00068 if (!$settings["hos_type"] or !$settings["shib_user_default_role"] or !$settings["shib_login"]
00069 or !$settings["shib_firstname"] or !$settings["shib_lastname"])
00070 {
00071 return false;
00072 }
00073
00074 $this->ilias->setSetting('shibboleth_active',true);
00075
00076 return true;
00077 }
00078
00079 function checkAuthRADIUS()
00080 {
00081 $settings = $this->ilias->getAllSettings();
00082
00083 if (!$settings["radius_server"] or !$settings["radius_shared_secret"] or !$settings["radius_port"])
00084 {
00085 return false;
00086 }
00087
00088 $this->ilias->setSetting('radius_active',true);
00089
00090 return true;
00091 }
00092
00093 function checkAuthScript()
00094 {
00095 $settings = $this->ilias->getAllSettings();
00096
00097 if (!$settings["auth_script_name"])
00098 {
00099 return false;
00100 }
00101
00102 $this->ilias->setSetting('script_active',true);
00103
00104 return true;
00105 }
00106
00113 function update()
00114 {
00115 if (!parent::update())
00116 {
00117 return false;
00118 }
00119
00120
00121
00122 return true;
00123 }
00124
00132 function ilClone($a_parent_ref)
00133 {
00134 global $rbacadmin;
00135
00136
00137 $new_ref_id = parent::ilClone($a_parent_ref);
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152 return $new_ref_id;
00153 }
00154
00161 function delete()
00162 {
00163
00164 if (!parent::delete())
00165 {
00166 return false;
00167 }
00168
00169
00170
00171 return true;
00172 }
00173
00183 function initDefaultRoles()
00184 {
00185 global $rbacadmin;
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197 return $roles ? $roles : array();
00198 }
00199
00213 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
00214 {
00215 global $tree;
00216
00217 switch ($a_event)
00218 {
00219 case "link":
00220
00221
00222
00223
00224 break;
00225
00226 case "cut":
00227
00228
00229
00230 break;
00231
00232 case "copy":
00233
00234
00235
00236
00237 break;
00238
00239 case "paste":
00240
00241
00242
00243 break;
00244
00245 case "new":
00246
00247
00248
00249 break;
00250 }
00251
00252
00253 if ($a_node_id==$_GET["ref_id"])
00254 {
00255 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
00256 $parent_type = $parent_obj->getType();
00257 if($parent_type == $this->getType())
00258 {
00259 $a_node_id = (int) $tree->getParentId($a_node_id);
00260 }
00261 }
00262
00263 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
00264 }
00265 }
00266 ?>