Fix: Hide data if user has no permission
This commit is contained in:
parent
4017a39162
commit
03c4232191
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||
@ -64,7 +64,7 @@ if ($_GET["action"] == 'attribute_prefix' && $user->rights->societe->creer)
|
||||
$societe = new Societe($db, $_GET["socid"]);
|
||||
$societe->attribute_prefix($db, $_GET["socid"]);
|
||||
}
|
||||
// conditions de r<EFBFBD>glement
|
||||
// conditions de reglement
|
||||
if ($_POST["action"] == 'setconditions' && $user->rights->societe->creer)
|
||||
{
|
||||
|
||||
@ -75,7 +75,7 @@ if ($_POST["action"] == 'setconditions' && $user->rights->societe->creer)
|
||||
$result = $db->query($sql);
|
||||
if (! $result) dolibarr_print_error($result);
|
||||
}
|
||||
// mode de r<EFBFBD>glement
|
||||
// mode de reglement
|
||||
if ($_POST["action"] == 'setmode' && $user->rights->societe->creer)
|
||||
{
|
||||
$societe = new Societe($db, $_GET["socid"]);
|
||||
@ -348,9 +348,9 @@ if ($socid > 0)
|
||||
$now=gmmktime();
|
||||
|
||||
/*
|
||||
* Dernieres propales
|
||||
* Last proposals
|
||||
*/
|
||||
if ($conf->propal->enabled)
|
||||
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
{
|
||||
$propal_static=new Propal($db);
|
||||
|
||||
@ -400,9 +400,9 @@ if ($socid > 0)
|
||||
}
|
||||
|
||||
/*
|
||||
* Dernieres commandes
|
||||
* Last orders
|
||||
*/
|
||||
if($conf->commande->enabled)
|
||||
if ($conf->commande->enabled && $user->rights->commande->lire)
|
||||
{
|
||||
$commande_static=new Commande($db);
|
||||
|
||||
@ -450,7 +450,7 @@ if ($socid > 0)
|
||||
/*
|
||||
* Last linked contracts
|
||||
*/
|
||||
if($conf->contrat->enabled)
|
||||
if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
||||
{
|
||||
$contratstatic=new Contrat($db);
|
||||
|
||||
@ -507,7 +507,7 @@ if ($socid > 0)
|
||||
/*
|
||||
* Dernieres interventions
|
||||
*/
|
||||
if ($conf->ficheinter->enabled)
|
||||
if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -551,7 +551,7 @@ if ($socid > 0)
|
||||
/*
|
||||
* Last linked projects
|
||||
*/
|
||||
if ($conf->projet->enabled)
|
||||
if ($conf->projet->enabled && $user->rights->projet->lire)
|
||||
{
|
||||
print '<table class="noborder" width=100%>';
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -212,8 +212,8 @@ if ($socid > 0)
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
/**
|
||||
* Dernieres factures
|
||||
/*
|
||||
* Last invoices
|
||||
*/
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
{
|
||||
@ -280,9 +280,9 @@ if ($socid > 0)
|
||||
}
|
||||
|
||||
/*
|
||||
* Derniers projets associes
|
||||
* Last project
|
||||
*/
|
||||
if ($conf->projet->enabled)
|
||||
if ($conf->projet->enabled && $user->rights->projet->lire)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user