FIX broken feature (better check)
This commit is contained in:
parent
ffeeb782b0
commit
f7703235c7
@ -58,6 +58,10 @@ if (! empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
$socid=0;
|
||||
if (isset($user->societe_id) && $user->societe_id > 0) $socid = $user->societe_id;
|
||||
$feature2 = (($socid && $user->rights->user->self->creer)?'':'user');
|
||||
if ($user->id == $id && (! empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->user->self_advance->readperms))) // A user can always read its own card if not advanced perms enabled, or if he has advanced perms
|
||||
{
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$result = restrictedArea($user, 'user', $id, 'user&user', $feature2);
|
||||
if ($user->id <> $id && ! $canreaduser) accessforbidden();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user