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
00033 include_once "./classes/class.ilObject.php";
00034
00035 class ilObjAuthSettings extends ilObject
00036 {
00043 function ilObjAuthSettings($a_id = 0,$a_call_by_reference = true)
00044 {
00045 $this->type = "auth";
00046 $this->ilObject($a_id,$a_call_by_reference);
00047 }
00048
00049 function checkAuthLDAP()
00050 {
00051 $settings = $this->ilias->getAllSettings();
00052
00053 if (!$settings["ldap_server"] or !$settings["ldap_basedn"] or !$settings["ldap_port"])
00054 {
00055 return false;
00056 }
00057
00058 $this->ilias->setSetting('ldap_active',true);
00059
00060 return true;
00061 }
00062
00063 function checkAuthSHIB()
00064 {
00065 $settings = $this->ilias->getAllSettings();
00066
00067 if (!$settings["hos_type"] or !$settings["shib_user_default_role"] or !$settings["shib_login"]
00068 or !$settings["shib_firstname"] or !$settings["shib_lastname"])
00069 {
00070 return false;
00071 }
00072
00073 $this->ilias->setSetting('shibboleth_active',true);
00074
00075 return true;
00076 }
00077
00078 function checkAuthRADIUS()
00079 {
00080 $settings = $this->ilias->getAllSettings();
00081
00082 if (!$settings["radius_server"] or !$settings["radius_shared_secret"] or !$settings["radius_port"])
00083 {
00084 return false;
00085 }
00086
00087 $this->ilias->setSetting('radius_active',true);
00088
00089 return true;
00090 }
00091
00092 function checkAuthScript()
00093 {
00094 $settings = $this->ilias->getAllSettings();
00095
00096 if (!$settings["auth_script_name"])
00097 {
00098 return false;
00099 }
00100
00101 $this->ilias->setSetting('script_active',true);
00102
00103 return true;
00104 }
00105
00112 function update()
00113 {
00114 if (!parent::update())
00115 {
00116 return false;
00117 }
00118
00119
00120
00121 return true;
00122 }
00123
00124
00131 function delete()
00132 {
00133
00134 if (!parent::delete())
00135 {
00136 return false;
00137 }
00138
00139
00140
00141 return true;
00142 }
00143
00153 function initDefaultRoles()
00154 {
00155 global $rbacadmin;
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167 return $roles ? $roles : array();
00168 }
00169
00183 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
00184 {
00185 global $tree;
00186
00187 switch ($a_event)
00188 {
00189 case "link":
00190
00191
00192
00193
00194 break;
00195
00196 case "cut":
00197
00198
00199
00200 break;
00201
00202 case "copy":
00203
00204
00205
00206
00207 break;
00208
00209 case "paste":
00210
00211
00212
00213 break;
00214
00215 case "new":
00216
00217
00218
00219 break;
00220 }
00221
00222
00223 if ($a_node_id==$_GET["ref_id"])
00224 {
00225 $parent_obj =& $this->ilias->obj_factory->getInstanceByRefId($a_node_id);
00226 $parent_type = $parent_obj->getType();
00227 if($parent_type == $this->getType())
00228 {
00229 $a_node_id = (int) $tree->getParentId($a_node_id);
00230 }
00231 }
00232
00233 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
00234 }
00235 }
00236 ?>