diff --git a/htdocs/projet/fiche.php b/htdocs/projet/fiche.php index e6b107532fc..bf8e78812f1 100644 --- a/htdocs/projet/fiche.php +++ b/htdocs/projet/fiche.php @@ -24,6 +24,10 @@ require("../propal.class.php"); require("../facture.class.php"); require("../commande/commande.class.php"); +$user->getrights('projet'); +if (!$user->rights->projet->lire) + accessforbidden(); + if ($HTTP_POST_VARS["action"] == 'update') { $projet = new Project($db); @@ -117,7 +121,7 @@ if ($_GET["action"] == 'create') dolibarr_fiche_head($head, 0); - if ($action == 'edit') + if ($_GET["action"] == 'edit') { print '
'; print ''; @@ -137,22 +141,24 @@ if ($_GET["action"] == 'create') print ''; } + print ''; - print '
'; - - - if ($action == "edit") + if ($user->rights->projet->creer == 1) { - print 'Annuler'; + print '
'; + if ($_GET["action"] == "edit") + { + print 'Annuler'; + } + else + { + print 'Editer'; + } + + print 'Supprimer'; + + print "
"; } - else - { - print 'Editer'; - } - - print 'Supprimer'; - - print "
"; } $db->close();