Skip to content
Snippets Groups Projects
Commit b774c14f authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Delete with ftp module

parent 537bf807
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* \file htdocs/ftp/index.php * \file htdocs/ftp/index.php
* \ingroup ftp * \ingroup ftp
* \brief Main page for FTP section area * \brief Main page for FTP section area
* \version $Id: index.php,v 1.22 2011/07/18 00:03:18 eldy Exp $ * \version $Id: index.php,v 1.23 2011/07/18 00:49:19 eldy Exp $
* \author Laurent Destailleur * \author Laurent Destailleur
*/ */
...@@ -39,9 +39,6 @@ $langs->load("other"); ...@@ -39,9 +39,6 @@ $langs->load("other");
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'ftp',''); $result = restrictedArea($user, 'ftp','');
// Load permissions
$user->getrights('ftp');
// Get parameters // Get parameters
$action = isset($_GET["action"])?$_GET["action"]:$_POST['action']; $action = isset($_GET["action"])?$_GET["action"]:$_POST['action'];
$section=isset($_GET["section"])?$_GET["section"]:$_POST['section']; $section=isset($_GET["section"])?$_GET["section"]:$_POST['section'];
...@@ -628,7 +625,7 @@ if ($conn_id) ftp_close($conn_id); ...@@ -628,7 +625,7 @@ if ($conn_id) ftp_close($conn_id);
// End of page // End of page
$db->close(); $db->close();
llxFooter('$Date: 2011/07/18 00:03:18 $ - $Revision: 1.22 $'); llxFooter('$Date: 2011/07/18 00:49:19 $ - $Revision: 1.23 $');
/** /**
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* \file htdocs/lib/functions.lib.php * \file htdocs/lib/functions.lib.php
* \brief A set of functions for Dolibarr * \brief A set of functions for Dolibarr
* This file contains all frequently used functions. * This file contains all frequently used functions.
* \version $Id: functions.lib.php,v 1.546 2011/07/09 11:24:32 eldy Exp $ * \version $Id: functions.lib.php,v 1.547 2011/07/18 00:48:33 eldy Exp $
*/ */
// For compatibility during upgrade // For compatibility during upgrade
...@@ -2213,6 +2213,10 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename='' ...@@ -2213,6 +2213,10 @@ function restrictedArea($user, $features='societe', $objectid=0, $dbtablename=''
{ {
if (! $user->rights->ecm->upload) $deleteok=0; if (! $user->rights->ecm->upload) $deleteok=0;
} }
else if ($feature == 'ftp')
{
if (! $user->rights->ftp->write) $deleteok=0;
}
else if (! empty($feature2)) // This should be used for future changes else if (! empty($feature2)) // This should be used for future changes
{ {
if (empty($user->rights->$feature->$feature2->supprimer) if (empty($user->rights->$feature->$feature2->supprimer)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment