Gestion des permissions et categories

This commit is contained in:
Michael RICOIS 2016-09-16 17:07:59 +02:00
parent ab66181bf8
commit 3bca76b7ea
2 changed files with 120 additions and 56 deletions

View File

@ -0,0 +1,112 @@
<?php
return array(
'RECHERCHE' => array(
'label' => "Recherche",
'droits' => array(
'RECHCSV',
'IPARI',
'HISTOBODACC',
'INVESTIG',
'SEARCHENT',
'SEARCHDIR',
'SEARCHACT'
),
),
'IDENTITE' => array(
'label' => "Identité",
'droits' => array(
'IDENTITE',
'IDPROCOL',
'LIENS',
'ETABLISSEMENTS',
'GROUPE',
'EVENINSEE',
'AVISINSEE',
'AVISRNCS',
'RNVP'
),
),
'DIRIGEANT' => array(
'label' => "Dirigeant",
'droits' => array(
'DIRIGEANTS',
'DIRIGEANTSOP',
'WORLDCHECK'
),
),
'FINANCE' => array(
'label' => 'Elements Financiers',
'droits' => array(
'SYNTHESE',
'RATIOS',
'FLUX',
'LIASSE',
'LIASSEXLS',
'UPLOADBILAN',
'BOURSE',
'BANQUE'
),
),
'JURIDIQUE' => array(
'label' => 'Elements Juridiques',
'droits' => array('ANNONCES',
'INFOSREG',
'COMPETENCES',
'CONVENTIONS',
'MARQUES',
'CONTENTIEUX'
),
),
'EVALUATION' => array(
'label' => 'Evaluation',
'droits' => array(
'INDISCORE',
'INDISCORE2',
'INDISCORE3',
'INDISCOREP',
'INDISCORE2P',
'INDISCORE3P',
'VALORISATION',
'ENQUETEC',
'AVISCREDIT'
),
),
'PIECES' => array(
'label' => 'Pièces officielles',
'droits' => array(
'KBIS',
'ACTES',
'PRIVILEGES'
),
),
'SURVEILLANCES' => array(
'label' => 'Surveillances',
'droits' => array(
'SURVANNONCE',
'SURVINSEE',
'SURVBILAN',
'SURVSCORE',
'SURVACTES',
'SURVDIRIGEANTS',
'SURVPAIEMENTS',
'SURVLIENS',
'SURVPRIV',
),
),
'OPTIONS' => array(
'label' => 'Options',
'droits' => array(
'MONPROFIL',
'SURVLISTE',
'PORTEFEUILLE',
'EDITION'
),
),
'DIVERS' => array(
'label' => 'Divers',
'droits' => array(
'INTERNATIONAL',
'BDF'
),
),
);

View File

@ -72,65 +72,16 @@ class Scores_Ws_Server
);
/**
* List all permission
* Liste des permissions
* @var array
*
* category
*
* acces
* code | label | category
*
*/
protected $listeDroits = array ();
protected $listeDroits = array();
protected $listeCategory = array(
'RECHERCHE' => array(
'label' => "Recherche",
'droits' => array('RECHCSV', 'IPARI', 'HISTOBODACC', 'INVESTIG', 'SEARCHENT',
'SEARCHDIR', 'SEARCHACT'),
),
'IDENTITE' => array(
'label' => "Identité",
'droits' => array('IDENTITE','IDPROCOL', 'LIENS', 'ETABLISSEMENTS', 'GROUPE',
'EVENINSEE', 'AVISINSEE', 'AVISRNCS', 'RNVP'),
),
'DIRIGEANT' => array(
'label' => "Dirigeant",
'droits' => array('DIRIGEANTS','DIRIGEANTSOP', 'WORLDCHECK'),
),
'FINANCE' => array(
'label' => 'Elements Financiers',
'droits' => array('SYNTHESE','RATIOS','FLUX','LIASSE','LIASSEXLS', 'UPLOADBILAN',
'BOURSE','BANQUE'),
),
'JURIDIQUE' => array(
'label' => 'Elements Juridiques',
'droits' => array('ANNONCES','INFOSREG','COMPETENCES','CONVENTIONS','MARQUES'),
),
'EVALUATION' => array(
'label' => 'Evaluation',
'droits' => array('INDISCORE', 'INDISCORE2', 'INDISCORE3', 'INDISCOREP', 'INDISCORE2P',
'INDISCORE3P','VALORISATION','ENQUETEC','AVISCREDIT'),
),
'PIECES' => array(
'label' => 'Pièces officielles',
'droits' => array('KBIS', 'ACTES', 'PRIVILEGES'),
),
'SURVEILLANCES' => array(
'label' => 'Surveillances',
'droits' => array('SURVANNONCE', 'SURVINSEE', 'SURVBILAN', 'SURVSCORE', 'SURVACTES',
'SURVDIRIGEANTS', 'SURVPAIEMENTS', 'SURVLIENS', 'SURVPRIV',
),
),
'OPTIONS' => array(
'label' => 'Options',
'droits' => array('MONPROFIL','SURVLISTE','PORTEFEUILLE','EDITION'),
),
'DIVERS' => array(
'label' => 'Divers',
'droits' => array('INTERNATIONAL', 'BDF'),
),
);
/**
* Permissions et catégories
* @var array
*/
protected $listeCategory = array();
/**
* List preferences
@ -300,6 +251,7 @@ class Scores_Ws_Server
$this->listeDroits = include APPLICATION_PATH . '/../library/Scores/Account/Access.php';
$this->listeCategory = include APPLICATION_PATH . '/../library/Scores/Account/Category.php';
}
/**