FusionDirectory
 All Data Structures Files Functions Variables
Public Member Functions
userinfo Class Reference

Class userinfo This class contains all informations and functions about user. More...

Public Member Functions

 loadLDAPInfo ()
 Loads user information from LDAP.
 
 reset_acl_cache ()
 Reset acl cache.
 
 loadACL ()
 Load an acl.
 
 get_acl_target_objects ()
 Returns an array containing all target objects we've permissions on. More...
 
 get_category_permissions ($dn, $category)
 Get permissions by category. More...
 
 is_copyable ($dn, $object)
 Check if the given object (dn) is copyable. More...
 
 is_cutable ($dn, $object, $class)
 Check if the given object (dn) is cutable. More...
 
 is_pasteable ($dn, $object)
 Checks if we are allowed to paste an object to the given destination ($dn) More...
 
 allow_snapshot_restore ($dn, $object)
 Checks if we are allowed to restore a snapshot for the given dn. More...
 
 allow_snapshot_create ($dn, $object)
 Checks if we are allowed to create a snapshot of the given dn. More...
 
 get_permissions ($dn, $object, $attribute="", $skip_write=FALSE)
 Get the permissions for a specified dn. More...
 
 get_module_departments ($module, $skip_self_acls=FALSE)
 Extract all departments that are accessible. More...
 
 mergeACL ($acl, $type, $newACL)
 Merge acls. More...
 
 cleanACL ($acl, $reset=FALSE)
 Clean acls. More...
 
 get_complete_category_acls ($dn, $category)
 Return combined acls for a given category. More...
 
 ignore_acl_for_current_user ()
 Ignore acl for the current user. More...
 
 expired_status ()
 Checks the posixAccount status by comparing the shadow attributes. More...
 

Detailed Description

Class userinfo This class contains all informations and functions about user.

Definition at line 33 of file class_userinfo.inc.

Member Function Documentation

allow_snapshot_create (   $dn,
  $object 
)

Checks if we are allowed to create a snapshot of the given dn.

Parameters
string$dnThe source dn
string$objectThe acl category (e.g. user)
Returns
boolean TRUE if we are allowed to restore a snapshot.

Definition at line 381 of file class_userinfo.inc.

References get_complete_category_acls().

allow_snapshot_restore (   $dn,
  $object 
)

Checks if we are allowed to restore a snapshot for the given dn.

Parameters
string$dnThe destination dn
string$objectThe acl category (e.g. user)
Returns
boolean TRUE if we are allowed to restore a snapshot.

Definition at line 358 of file class_userinfo.inc.

References get_complete_category_acls().

cleanACL (   $acl,
  $reset = FALSE 
)

Clean acls.

Parameters
$aclACL to be cleaned
boolean$resetFALSE

Definition at line 741 of file class_userinfo.inc.

Referenced by get_permissions().

expired_status ( )

Checks the posixAccount status by comparing the shadow attributes.

Parameters
object$configThe FusionDirectory configuration object.
Returns
const POSIX_ACCOUNT_EXPIRED - If the account is expired. POSIX_WARN_ABOUT_EXPIRATION - If the account is going to expire. POSIX_FORCE_PASSWORD_CHANGE - The password has to be changed. POSIX_DISALLOW_PASSWORD_CHANGE - The password cannot be changed right now.
 shadowLastChange
 |
 |---- shadowMin --->    |       <-- shadowMax --
 |                       |       |
 |------- shadowWarning ->       |
                                 |-- shadowInactive --> DEACTIVATED
                                 |
                                 EXPIRED

Definition at line 853 of file class_userinfo.inc.

get_acl_target_objects ( )

Returns an array containing all target objects we've permissions on.

Returns
Return the next id or NULL if failed

Definition at line 280 of file class_userinfo.inc.

get_category_permissions (   $dn,
  $category 
)

Get permissions by category.

Parameters
string$dnDn from which we want to know permissions.
string$categoryCategory for which we want the acl eg: server
Returns
all the permissions for the dn and category

Definition at line 294 of file class_userinfo.inc.

References get_permissions().

Referenced by get_module_departments().

get_complete_category_acls (   $dn,
  $category 
)

Return combined acls for a given category.

Return combined acls for a given category. All acls will be combined like boolean AND As example ('rwcdm' + 'rcd' + 'wrm'= 'r')

Results will be cached in $this->result_cache. $this->result_cache will be resetted if load_acls is called.

Parameters
string$dnThe DN
string$categoryThe category
Returns
string return acl combined with boolean AND

Definition at line 784 of file class_userinfo.inc.

References get_permissions().

Referenced by allow_snapshot_create(), allow_snapshot_restore(), is_copyable(), is_cutable(), and is_pasteable().

get_module_departments (   $module,
  $skip_self_acls = FALSE 
)

Extract all departments that are accessible.

Extract all departments that are accessible (direct or 'on the way' to an accessible department)

Parameters
string$moduleThe module
bool$skip_self_aclsFALSE
Returns
array Return all accessible departments

Definition at line 616 of file class_userinfo.inc.

References get_category_permissions(), get_permissions(), session\global_get_ref(), and ignore_acl_for_current_user().

get_permissions (   $dn,
  $object,
  $attribute = "",
  $skip_write = FALSE 
)

Get the permissions for a specified dn.

Parameters
string$dnThe object dn
string$objectThe acl category (e.g. user)
string$attributeThe acl class (e.g. user)
bool$skip_writeRemove the write acl for this dn

Definition at line 406 of file class_userinfo.inc.

References cleanACL(), session\global_get_ref(), ignore_acl_for_current_user(), and mergeACL().

Referenced by get_category_permissions(), get_complete_category_acls(), get_module_departments(), and is_cutable().

ignore_acl_for_current_user ( )

Ignore acl for the current user.

Returns
Returns TRUE if the current user is configured in IGNORE_ACL=".." in your fusiondirectory.conf FALSE otherwise

Definition at line 825 of file class_userinfo.inc.

Referenced by get_module_departments(), and get_permissions().

is_copyable (   $dn,
  $object 
)

Check if the given object (dn) is copyable.

Parameters
string$dnThe object dn
string$objectThe acl category (e.g. user)
Returns
boolean TRUE if the given object is copyable else FALSE

Definition at line 309 of file class_userinfo.inc.

References get_complete_category_acls().

is_cutable (   $dn,
  $object,
  $class 
)

Check if the given object (dn) is cutable.

Parameters
string$dnThe object dn
string$objectThe acl category (e.g. user)
string$classThe acl class (e.g. user)
Returns
boolean TRUE if the given object is cutable else FALSE

Definition at line 326 of file class_userinfo.inc.

References get_complete_category_acls(), and get_permissions().

is_pasteable (   $dn,
  $object 
)

Checks if we are allowed to paste an object to the given destination ($dn)

Parameters
string$dnThe destination dn
string$objectThe acl category (e.g. user)
Returns
Boolean TRUE if we are allowed to paste an object.

Definition at line 343 of file class_userinfo.inc.

References get_complete_category_acls().

mergeACL (   $acl,
  $type,
  $newACL 
)

Merge acls.

Parameters
$aclThe ACL
$typeThe type
$newACLThe new ACL

Definition at line 700 of file class_userinfo.inc.

Referenced by get_permissions().


The documentation for this class was generated from the following file: