Signed-off-by: Stéphane Jacob <sj@m4x.org>
$this->text = trim($this->text);
$this->phones = Phone::formatFormArray($this->phones, $this->error, new ProfileVisibility($this->pub));
if ($this->removed == 1) {
- if (S::user()->checkPerms('directory_ax') && Phone::hasPrivate($this->phones)) {
+ if (!S::user()->checkPerms('directory_private') && Phone::hasPrivate($this->phones)) {
Platal::page()->trigWarning("L'adresse ne peut être supprimée car elle contient des informations pour lesquelles vous n'avez le droit d'édition.");
} else {
$this->text = '';
}
if (isset($job['removed']) && $job['removed']) {
- if (S::user()->checkPerms('directory_ax')
+ if (!S::user()->checkPerms('directory_private')
&& (Phone::hasPrivate($job['w_phone']) || Address::hasPrivate($job['w_address']) || $job['w_email_pub'] == 'private')) {
Platal::page()->trigWarning("L'entreprise ne peut être supprimée car elle contient des informations pour lesquelles vous n'avez le droit d'édition.");
} else {