diff --git a/htdocs/exports/export.class.php b/htdocs/exports/export.class.php
index 0e8aac583b9..44295a77c48 100644
--- a/htdocs/exports/export.class.php
+++ b/htdocs/exports/export.class.php
@@ -96,6 +96,7 @@ class Export
{
$bool=$user->rights->$perm[0]->$perm[1];
}
+ if ($perm[0]=='user' && $user->admin) $bool=true;
//print("$bool
");
// Permissions ok
diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php
index a8af82e1873..d755d7cc01c 100644
--- a/htdocs/exports/index.php
+++ b/htdocs/exports/index.php
@@ -79,7 +79,7 @@ print '
';
// Affiche les modules d'exports
print '';
print '';
-print '| '.$langs->trans("Module").' | ';
+print ''.$langs->trans("Module").' | ';
print ''.$langs->trans("ExportableDatas").' | ';
print ' | ';
print ' ';
diff --git a/htdocs/includes/modules/modUser.class.php b/htdocs/includes/modules/modUser.class.php
index 7994772e3e1..a30527fb327 100644
--- a/htdocs/includes/modules/modUser.class.php
+++ b/htdocs/includes/modules/modUser.class.php
@@ -1,5 +1,6 @@
+ * Copyright (C) 2005 Laurent Destailleur
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -127,6 +128,26 @@ class modUser extends DolibarrModules
$this->rights[$r][3] = 1;
$this->rights[$r][4] = 'self';
$this->rights[$r][5] = 'password';
+
+ $r++;
+ $this->rights[$r][0] = 258;
+ $this->rights[$r][1] = 'Exporter les utilisateurs';
+ $this->rights[$r][2] = 'r';
+ $this->rights[$r][3] = 0;
+ $this->rights[$r][4] = 'user';
+ $this->rights[$r][5] = 'export';
+
+ // Exports
+ //--------
+ $r=0;
+
+ $r++;
+ $this->export_code[$r]=$this->numero.'_'.$r;
+ $this->export_label[$r]='Liste des utilisateurs Dolibarr et attributs';
+ $this->export_fields_array[$r]=array('u.rowid'=>"Id",'u.name'=>"Lastname",'u.firstname'=>"Firstname",'u.code'=>"Code",'u.login'=>"Login",'u.datec'=>"DateCreation",'u.tms'=>"DateLastModification",'u.admin'=>"Admin",'u.fk_socpeople'=>"IdContact",'u.note'=>"Note",'u.datelastaccess'=>'DateLastAccess');
+ $this->export_sql[$r]="select ".join(',',array_keys($this->export_fields_array[$r])).' from '.MAIN_DB_PREFIX.'user as u';
+ $this->export_permission[$r]=array(array("user","user","export"));
+
}
|