Correction 'indexOf'
This commit is contained in:
parent
6011199fc7
commit
48aadff221
|
@ -363,15 +363,7 @@
|
||||||
for( var a in Object.keys(ACTIONS[COUNT]) ){
|
for( var a in Object.keys(ACTIONS[COUNT]) ){
|
||||||
|
|
||||||
/* (3) On vérifie que l'utilisateur a la permissions d'effectuer l'action */
|
/* (3) On vérifie que l'utilisateur a la permissions d'effectuer l'action */
|
||||||
var hasPermission = false;
|
var hasPermission = PERMISSIONS.hasOwnProperty(CARD) && PERMISSIONS[CARD].indexOf( ACTIONS[COUNT][a].id_action.toString() ) > -1;
|
||||||
|
|
||||||
// On vérifie parmis toutes les permissions de cette CARTE
|
|
||||||
if( PERMISSIONS.hasOwnProperty(CARD) )
|
|
||||||
for( var i = 0 ; i < PERMISSIONS[CARD].length ; i++ )
|
|
||||||
if( PERMISSIONS[CARD][i] == ACTIONS[COUNT][a].id_action ){
|
|
||||||
hasPermission = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Si on a pas la permission, on quitte
|
// Si on a pas la permission, on quitte
|
||||||
if( !hasPermission ) continue;
|
if( !hasPermission ) continue;
|
||||||
|
|
Loading…
Reference in New Issue