Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
ldap_simple_edit_user.inc
1 <?php
18 require_once SQ_PACKAGES_PATH.'/ldap/ldap_user/ldap_user.inc';
19 
31 {
32 
38  var $_ldapid = 0;
39 
40 
48  function Ldap_Simple_Edit_User($ldapid=0, $data=Array())
49  {
50  $this->Ldap_User($ldapid, $data);
51 
52  }//end constructor
53 
54 
64  function _getName($short_name=FALSE)
65  {
66  return 'LDAP Simple Edit User';
67 
68  }//end _getName()
69 
70 
80  function canAccessBackend()
81  {
82  // Simple_Edit_User must not access the backend interface however it can access limbo
83  // This function is called before limbo access is granted because traditionally, backend access is
84  // required for limbo
85  // Permit 'backend' access only if this user is requesting a limbo page
86  // Allow simple edit user to have backend interface access when in cron
87  // we also have to consider the EES/JS API. Here the State wouldnt be in SQ_IN_LIMBO
88  // but never the less we are in simple edit.
89  // Lets be a bit chicky here and check the referer to decide if we are indeed in LIMBO
90  // We also have to make sure that the user we are currently deling with isnt the user
91  // who initiated the workflow. or else he deserves to be known
92  $in_limbo = $workflow_starter = FALSE;
93  if(isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER'])) {
94  $in_limbo = (strpos($_SERVER['HTTP_REFERER'],SQ_CONF_LIMBO_SUFFIX) !== FALSE) ? TRUE : FALSE;
95  }
96 
97  // we are not in limbo or EES see if the user was a workflow starter and if the workflow has been canceled
98  // see workflow_manager::cancelWorkflow()
99  if(!$in_limbo && (isset($this->_tmp['starter_of_workflow']) && $this->_tmp['starter_of_workflow'])) $workflow_starter = TRUE;
100 
101  return (SQ_IN_LIMBO || SQ_IN_CRON || $in_limbo || $workflow_starter);
102 
103  }//end canAccessBackend()
104 
105 
114  {
115  return TRUE;
116 
117  }//end isShadowSimpleEditUser()
118 
119 
120 }//end class
121 
122 ?>