From c2efee8a2923be093f159dbb87f4a3aed693cab2 Mon Sep 17 00:00:00 2001 From: fmarcet <fmarcet@2byte.es> 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 <jmenent@2byte.es> * Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr> * Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro> - * Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es> + * Copyright (C) 2014-2016 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2014 Marcos GarcĂa <marcosgdf@gmail.com> * * 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 '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&ligne='.$object->lines[$cursorline-1]->id.'&action='.$tmpaction.'">'; - print img_edit(); - print '</a>'; + if (($tmpaction=='activateline' && $user->rights->contrat->activer) || ($tmpaction=='unactivateline' && $user->rights->contrat->unactiver)) { + print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&ligne=' . $object->lines[$cursorline - 1]->id . '&action=' . $tmpaction . '">'; + print img_edit(); + print '</a>'; + } } } print '</td>'; -- GitLab