Fix: Test on permisions
This commit is contained in:
parent
6db46b53be
commit
5d47ed6e83
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (c) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (c) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,10 +18,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/commande/stats/index.php
|
* \file htdocs/commande/stats/index.php
|
||||||
\ingroup commande
|
* \ingroup commande
|
||||||
\brief Page des stats commandes
|
* \brief Page des stats commandes
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -32,9 +32,13 @@ require_once(DOL_DOCUMENT_ROOT."/core/dolgraph.class.php");
|
|||||||
$WIDTH=500;
|
$WIDTH=500;
|
||||||
$HEIGHT=200;
|
$HEIGHT=200;
|
||||||
|
|
||||||
if (!$user->rights->commande->lire) accessforbidden();
|
$mode='customer';
|
||||||
|
if (isset($_GET["mode"])) $mode=$_GET["mode"];
|
||||||
|
|
||||||
// Sécurité accés client
|
if ($mode == 'customer' && ! $user->rights->commande->lire) accessforbidden();
|
||||||
|
if ($mode == 'supplier' && ! $user->rights->fournisseur->commande->lire) accessforbidden();
|
||||||
|
|
||||||
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
{
|
{
|
||||||
$action = '';
|
$action = '';
|
||||||
@ -45,8 +49,7 @@ $year = strftime("%Y", time());
|
|||||||
$startyear=$year-2;
|
$startyear=$year-2;
|
||||||
$endyear=$year;
|
$endyear=$year;
|
||||||
|
|
||||||
$mode='customer';
|
|
||||||
if (isset($_GET["mode"])) $mode=$_GET["mode"];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user