Correction erreur de permissions

This commit is contained in:
Rodolphe Quiedeville 2005-07-27 15:59:44 +00:00
parent 4c78d87a90
commit 08abc1cc4f

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004 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
@ -24,15 +24,13 @@
/*! /*!
\file htdocs/compta/bank/categ.php \file htdocs/compta/bank/categ.php
\ingroup compta \ingroup compta
\brief Page ajout de catégories banaires \brief Page ajout de catégories bancaires
\version $Revision$ \version $Revision$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
$user->getrights('compta'); if (!$user->rights->banque->configurer)
if (!$user->admin && !$user->rights->banque->configurer)
accessforbidden(); accessforbidden();
llxHeader(); llxHeader();
@ -43,7 +41,8 @@ llxHeader();
*/ */
if ($_POST["action"] == 'add') if ($_POST["action"] == 'add')
{ {
if ($_POST["label"]) { if ($_POST["label"])
{
$sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_categ (label) VALUES ('".$_POST["label"]."')"; $sql = "INSERT INTO ".MAIN_DB_PREFIX."bank_categ (label) VALUES ('".$_POST["label"]."')";
$result = $db->query($sql); $result = $db->query($sql);
@ -54,7 +53,6 @@ if ($_POST["action"] == 'add')
} }
} }
/* /*
* Affichage liste des catégories * Affichage liste des catégories
*/ */