Support nouveau webservice
This commit is contained in:
parent
8237c63d15
commit
a26bb42250
@ -46,6 +46,7 @@ $definePerms = array(
|
|||||||
function hasPerm($perm, $userInfos = '')
|
function hasPerm($perm, $userInfos = '')
|
||||||
{
|
{
|
||||||
$return = true;
|
$return = true;
|
||||||
|
if (is_object($userInfos)) { $userInfos = (array)$userInfos; }
|
||||||
if( $userInfos == '' && isset($_SESSION['tabInfo']['droits']) ){
|
if( $userInfos == '' && isset($_SESSION['tabInfo']['droits']) ){
|
||||||
$userInfos = $_SESSION['tabInfo'];
|
$userInfos = $_SESSION['tabInfo'];
|
||||||
}elseif( $userInfos == '' && !isset($_SESSION['tabInfo']['droits']) ||
|
}elseif( $userInfos == '' && !isset($_SESSION['tabInfo']['droits']) ||
|
||||||
@ -91,7 +92,7 @@ function checkPerm($page, $perm = '')
|
|||||||
function formElementPerm($userInfos){
|
function formElementPerm($userInfos){
|
||||||
global $definePerms, $firephp;
|
global $definePerms, $firephp;
|
||||||
$return = '';
|
$return = '';
|
||||||
FB::log($userInfos, 'userInfos');
|
if (is_object($userInfos)) { $userInfos = (array)$userInfos; }
|
||||||
$listeDroits = array_key_exists('droitsClients',$userInfos) ?
|
$listeDroits = array_key_exists('droitsClients',$userInfos) ?
|
||||||
explode(' ', $userInfos['droitsClients']) : array();
|
explode(' ', $userInfos['droitsClients']) : array();
|
||||||
foreach($definePerms as $perm => $infos){
|
foreach($definePerms as $perm => $infos){
|
||||||
|
@ -7,10 +7,11 @@ $definePref = array(
|
|||||||
'MAPPY' => array( 'init' => '', 'txt' => 'Afficher les façades d\'immeubles'),
|
'MAPPY' => array( 'init' => '', 'txt' => 'Afficher les façades d\'immeubles'),
|
||||||
'CARTES' => array( 'init' => '', 'txt' => 'Afficher les cartes et les plans'),
|
'CARTES' => array( 'init' => '', 'txt' => 'Afficher les cartes et les plans'),
|
||||||
'VOIRSURV' => array( 'init' => '', 'txt' => 'Afficher les entités sous surveillances'),
|
'VOIRSURV' => array( 'init' => '', 'txt' => 'Afficher les entités sous surveillances'),
|
||||||
);
|
);
|
||||||
|
|
||||||
function hasPref($name, $userInfo = ''){
|
function hasPref($name, $userInfo = ''){
|
||||||
$return = FALSE;
|
$return = FALSE;
|
||||||
|
if (is_object($userInfo)) { $userInfo = (array)$userInfo; }
|
||||||
if($userInfo == '' && isset($_SESSION['tabInfo']['pref']) ){
|
if($userInfo == '' && isset($_SESSION['tabInfo']['pref']) ){
|
||||||
$userInfo = $_SESSION['tabInfo'];
|
$userInfo = $_SESSION['tabInfo'];
|
||||||
}elseif($userInfo == '' && !isset($_SESSION['tabInfo']['pref']) ||
|
}elseif($userInfo == '' && !isset($_SESSION['tabInfo']['pref']) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user