Documentation
checkDep
usage
$security->checkDep( string depName [, string requiredPermission = 'W' ] )
paramètres
depName: the name of the dependency type which the user must be authorized to use
requiredPermission: whether the dependency type should be Readable or Writable.
retourne
throws a SusheeSecurityException if the user is not authorized.
Checks if the user can use this dependency type.
The access to a certain dependency type is defined in the modulekey for the module concerned by the type. The authorizations about the dependencytype are saved in the field DEPENDENCIES of the modulekey.
exemples
include_once("../Kernel/common/security.class.php");
try{
$security = new SusheeSecurity();
$security->checkDep('contactWork');
}catch( SusheeSecurityException $E ){
exit( 'Warning : '.$E->getMessage() );
}