2
0
forked from Wavyzz/dolibarr

Fix: Permission "read" of ecm document was not used and replaced by "download". As it is same permission, we moved back to "read" to be uniform with other modules: "read" must be first permission with number XXX1.

This commit is contained in:
Laurent Destailleur
2011-05-25 10:35:57 +00:00
parent 0f07175397
commit 7a616a8592
8 changed files with 15 additions and 26 deletions

View File

@@ -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);

View File

@@ -95,18 +95,11 @@ 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;
$this->rights[$r][1] = 'Soumettre ou supprimer des documents';
@@ -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++;

View File

@@ -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();
}
}

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;