Fix view access to specific autorized LSobject even if LSobject type is not in menu

This commit is contained in:
Benjamin Renard 2017-03-23 16:41:34 +01:00
parent 8f037d8421
commit c0c64d3bef

View file

@ -25,14 +25,15 @@ require_once 'core.php';
if(LSsession :: startLSsession()) {
if (isset($_REQUEST['LSobject'])) {
$LSobject = $_REQUEST['LSobject'];
$dn = isset($_REQUEST['dn'])?urldecode($_REQUEST['dn']):null;
if ( $LSobject == 'SELF' ) {
$LSobject = LSsession :: getLSuserObject() -> getType();
$dn = LSsession :: getLSuserObjectDn();
}
else {
$dn = isset($_REQUEST['dn'])?urldecode($_REQUEST['dn']):null;
}
if (LSsession :: in_menu($LSobject)) {
if ( $LSobject == 'SELF' ) {
$LSobject = LSsession :: getLSuserObject() -> getType();
$dn = LSsession :: getLSuserObjectDn();
}
if (LSsession :: in_menu($LSobject) || LSsession :: canAccess($LSobject,$dn)) {
if ( LSsession :: loadLSobject($LSobject) ) {
// Affichage d'un objet