diff --git a/htdocs/ecm/docmine.php b/htdocs/ecm/docmine.php index ab10615445c..40931053356 100644 --- a/htdocs/ecm/docmine.php +++ b/htdocs/ecm/docmine.php @@ -369,7 +369,7 @@ if ($user->rights->ecm->upload) } // List of document -if ($user->rights->ecm->download) +if ($user->rights->ecm->read) { $param='&section='.$section; $formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload); diff --git a/htdocs/includes/modules/modECM.class.php b/htdocs/includes/modules/modECM.class.php index f7ecc2e4cb0..371146989ec 100644 --- a/htdocs/includes/modules/modECM.class.php +++ b/htdocs/includes/modules/modECM.class.php @@ -95,17 +95,10 @@ class modECM extends DolibarrModules $r++; $this->rights[$r][0] = 2501; - $this->rights[$r][1] = 'Consulter les documents'; + $this->rights[$r][1] = 'Consulter/Télécharger les documents'; $this->rights[$r][2] = 'r'; $this->rights[$r][3] = 1; $this->rights[$r][4] = 'read'; - - $r++; - $this->rights[$r][0] = 2502; - $this->rights[$r][1] = 'Telecharger les documents'; - $this->rights[$r][2] = 'r'; - $this->rights[$r][3] = 1; - $this->rights[$r][4] = 'download'; $r++; $this->rights[$r][0] = 2503; @@ -136,7 +129,7 @@ class modECM extends DolibarrModules 'url'=>'/ecm/index.php', 'langs'=>'ecm', 'position'=>100, - 'perms'=>'$user->rights->ecm->download || $user->rights->ecm->upload || $user->rights->ecm->setup', + 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload || $user->rights->ecm->setup', 'enabled'=>'$conf->ecm->enabled', 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both @@ -150,8 +143,8 @@ class modECM extends DolibarrModules 'url'=>'/ecm/index.php', 'langs'=>'ecm', 'position'=>101, - 'perms'=>'$user->rights->ecm->download || $user->rights->ecm->upload', - 'enabled'=>'$user->rights->ecm->download || $user->rights->ecm->upload', + 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', + 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload', 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both $r++; @@ -176,8 +169,8 @@ class modECM extends DolibarrModules 'url'=>'/ecm/index.php?action=file_manager', 'langs'=>'ecm', 'position'=>102, - 'perms'=>'$user->rights->ecm->download || $user->rights->ecm->upload', - 'enabled'=>'$user->rights->ecm->download || $user->rights->ecm->upload', + 'perms'=>'$user->rights->ecm->read || $user->rights->ecm->upload', + 'enabled'=>'$user->rights->ecm->read || $user->rights->ecm->upload', 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both $r++; @@ -189,8 +182,8 @@ class modECM extends DolibarrModules 'url'=>'/ecm/search.php', 'langs'=>'ecm', 'position'=>103, - 'perms'=>'$user->rights->ecm->download', - 'enabled'=>'$user->rights->ecm->download', + 'perms'=>'$user->rights->ecm->read', + 'enabled'=>'$user->rights->ecm->read', 'target'=>'', 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both $r++; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 48e46117703..a7c58167955 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -3316,13 +3316,13 @@ function migrate_reload_modules($db,$langs,$conf) $mod->init(); } } - if (! empty($conf->global->MAIN_MODULE_ECM)) // Permission has changed into 3.0 + if (! empty($conf->global->MAIN_MODULE_ECM)) // Permission has changed into 3.0 and 3.1 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate module ECM"); if ($res) { $res=@include_once(DOL_DOCUMENT_ROOT.'/includes/modules/modECM.class.php'); $mod=new modECM($db); - //$mod->remove('noboxes'); // We need to remove because a permission id has been removed + $mod->remove('noboxes'); // We need to remove because a permission id has been removed $mod->init(); } } diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 16287ef7e2b..8bc1f61cac6 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -625,7 +625,7 @@ Permission2403=Modificar accions (esdeveniments o tasques) vinculades al seu com Permission2411=Eliminar accions (esdeveniments o tasques) d'altres Permission2412=Crear/eliminar accions (esdeveniments o tasques) d'altres Permission2413=Canviar accions (esdeveniments o tasques) d'altres -Permission2501=Consultar documents +Permission2501=Consultar/Recuperar documents Permission2502=Recuperar documents Permission2503=Enviar o eliminar documents Permission2515=Configuració carpetes de documents diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 71c824ddd75..072854b45b8 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -621,7 +621,7 @@ Permission2403=Delete actions (events or tasks) linked to his account Permission2411=Read actions (events or tasks) of others Permission2412=Create/modify actions (events or tasks) of others Permission2413=Delete actions (events or tasks) of others -Permission2501=Read documents +Permission2501=Read/Download documents Permission2502=Download documents Permission2503=Submit or delete documents Permission2515=Setup documents directories diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 3d594442dbb..118eecad91f 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -625,7 +625,7 @@ Permission2403=Modificar acciones (eventos o tareas) vinculadas a su cuenta Permission2411=Leer acciones (eventos o tareas) de otros Permission2412=Crear/modificar acciones (eventos o tareas) de otros Permission2413=Eliminar acciones (eventos o tareas) de otros -Permission2501=Consultar documentos +Permission2501=Consultar/Recuperar documentos Permission2502=Recuperar documentos Permission2503=Enviar o eliminar documentos Permission2515=Configuración directorios de documentos diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index c502a8f72cc..31f12de9903 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -627,7 +627,7 @@ Permission2403= Supprimer les actions (événements ou tâches) liées à son co Permission2411= Lire les actions (événements ou tâches) des autres Permission2412= Créer/modifier les actions (événements ou tâches) pour les autres Permission2413= Supprimer les actions (événements ou tâches) pour les autres -Permission2501= Lire les documents +Permission2501= Lire/Récupérer les documents Permission2502= Récupérer les documents Permission2503= Soumettre ou supprimer des documents Permission2515= Administrer les rubriques de documents diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 9cfd86fad95..8b69bf83fe6 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -2008,10 +2008,6 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename='' { if (! $user->rights->banque->cheque) $readok=0; } - else if ($feature == 'ecm') - { - if (! $user->rights->ecm->download) $readok=0; - } else if ($feature == 'projet') { if (! $user->rights->projet->lire && ! $user->rights->projet->all->lire) $readok=0;