New: Super clean of permissions checks

This commit is contained in:
Laurent Destailleur 2008-02-25 20:13:28 +00:00
parent 646a6307f0
commit 4fe7188333
6 changed files with 11 additions and 17 deletions

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2006-2007 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -15,15 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/
/**
\file htdocs/contact/exportimport.php
\ingroup societe
\brief Onglet exports-imports d'un contact
\version $Revision$
\version $Id$
*/
require("./pre.inc.php");
@ -35,7 +33,7 @@ $langs->load("companies");
// Security check
$contactid = isset($_GET["id"])?$_GET["id"]:'';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact',$contactid,'',1);
$result = restrictedArea($user, 'contact', $contactid, 'socpeople');
/*

View File

@ -41,7 +41,7 @@ $socid=$_GET["socid"]?$_GET["socid"]:$_POST["socid"];
// Security check
$contactid = isset($_GET["id"])?$_GET["id"]:'';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact', $contactid,'socpeople',0);
$result = restrictedArea($user, 'contact', $contactid, 'socpeople');
/*

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2008 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
@ -15,15 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/
/**
\file htdocs/contact/info.php
\ingroup societe
\brief Onglet info d'un contact
\version $Revision$
\version $Id$
*/
require("./pre.inc.php");
@ -35,7 +33,7 @@ $langs->load("companies");
// Security check
$contactid = isset($_GET["id"])?$_GET["id"]:'';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact',$contactid,'',1);
$result = restrictedArea($user, 'contact',$contactid,'socpeople');

View File

@ -36,7 +36,7 @@ $langs->load("admin");
// Security check
$contactid = isset($_GET["id"])?$_GET["id"]:'';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact',$contactid,'',1);
$result = restrictedArea($user, 'contact', $contactid, 'socpeople');
/*

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2008 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
@ -33,7 +33,7 @@ $langs->load("companies");
// Security check
$contactid = isset($_GET["id"])?$_GET["id"]:'';
if ($user->societe_id) $socid=$user->societe_id;
$result = restrictedArea($user, 'contact',$contactid,'',1);
$result = restrictedArea($user, 'contact', $contactid, 'socpeople');
/*

View File

@ -15,15 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/
/**
\file htdocs/contact/vcard.php
\ingroup societe
\brief Onglet vcard d'un contact
\version $Revision$
\version $Id$
*/
require("./pre.inc.php");