From c2efee8a2923be093f159dbb87f4a3aed693cab2 Mon Sep 17 00:00:00 2001 From: fmarcet Date: Tue, 26 Jan 2016 13:02:21 +0100 Subject: [PATCH] FIX: Contrat card don't consider user permissions to show active/unactive service button --- htdocs/contrat/card.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index e7075b4f22c..021479dd99d 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2014-2016 Ferran Marcet * Copyright (C) 2014 Marcos GarcĂ­a * * This program is free software; you can redistribute it and/or modify @@ -1548,9 +1548,11 @@ else { $tmpaction='activateline'; if ($objp->statut == 4) $tmpaction='unactivateline'; - print ''; - print img_edit(); - print ''; + if (($tmpaction=='activateline' && $user->rights->contrat->activer) || ($tmpaction=='unactivateline' && $user->rights->contrat->unactiver)) { + print ''; + print img_edit(); + print ''; + } } } print '';