From 3bca76b7ea2ba2ed7f922b469d85e4a367de0adc Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 16 Sep 2016 17:07:59 +0200 Subject: [PATCH] Gestion des permissions et categories --- library/Scores/Account/Category.php | 112 ++++++++++++++++++++++++++++ library/Scores/Ws/Server.php | 64 ++-------------- 2 files changed, 120 insertions(+), 56 deletions(-) create mode 100644 library/Scores/Account/Category.php diff --git a/library/Scores/Account/Category.php b/library/Scores/Account/Category.php new file mode 100644 index 00000000..5b36129c --- /dev/null +++ b/library/Scores/Account/Category.php @@ -0,0 +1,112 @@ + 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' + ), + ), +); \ No newline at end of file diff --git a/library/Scores/Ws/Server.php b/library/Scores/Ws/Server.php index 5b15e1b5..c546fc7f 100644 --- a/library/Scores/Ws/Server.php +++ b/library/Scores/Ws/Server.php @@ -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'; } /**