Skip to content

Commit

Permalink
Fix: business rule to protect button and action was not synchronized
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 24, 2013
1 parent 6f5e78d commit 65b6dca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/user/param_ihm.php
@@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro.com>
*
Expand Down Expand Up @@ -78,7 +78,7 @@
/*
* Actions
*/
if ($action == 'update' && ($caneditfield || $user->admin))
if ($action == 'update' && ($caneditfield || ! empty($user->admin)))
{
if (! $_POST["cancel"])
{
Expand Down Expand Up @@ -258,7 +258,7 @@
}
else
{
if ($user->id == $fuser->id || ! empty($user->admin)) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin
if ($caneditfield || ! empty($user->admin)) // Si utilisateur edite = utilisateur courant (pas besoin de droits particulier car il s'agit d'une page de modif d'output et non de données) ou si admin
{
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit&amp;id='.$fuser->id.'">'.$langs->trans("Modify").'</a>';
}
Expand Down

0 comments on commit 65b6dca

Please sign in to comment.