mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 03:12:35 +01:00
Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/tpl/objectline_create.tpl.php htdocs/langs/de_DE/bills.lang htdocs/langs/fr_FR/bills.lang htdocs/langs/fr_FR/main.lang htdocs/langs/fr_FR/suppliers.lang
This commit is contained in:
@@ -374,9 +374,10 @@ class User extends CommonObject
|
||||
* @param string $allmodule Ajouter tous les droits du module allmodule
|
||||
* @param string $allperms Ajouter tous les droits du module allmodule, perms allperms
|
||||
* @param int $entity Entity to use
|
||||
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
|
||||
* @return int > 0 if OK, < 0 if KO
|
||||
*/
|
||||
function addrights($rid, $allmodule='', $allperms='', $entity='')
|
||||
function addrights($rid, $allmodule='', $allperms='', $entity=0, $notrigger=0)
|
||||
{
|
||||
global $conf, $user, $langs;
|
||||
|
||||
@@ -457,7 +458,7 @@ class User extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
if (! $error && ! $notrigger)
|
||||
{
|
||||
$this->context = array('audit'=>$langs->trans("PermissionsAdd"));
|
||||
|
||||
@@ -485,10 +486,11 @@ class User extends CommonObject
|
||||
* @param int $rid Id du droit a retirer
|
||||
* @param string $allmodule Retirer tous les droits du module allmodule
|
||||
* @param string $allperms Retirer tous les droits du module allmodule, perms allperms
|
||||
* @param int $entity Entity to use
|
||||
* @param int $entity Entity to use
|
||||
* @param int $notrigger 1=Does not execute triggers, 0=Execute triggers
|
||||
* @return int > 0 if OK, < 0 if OK
|
||||
*/
|
||||
function delrights($rid, $allmodule='', $allperms='', $entity='')
|
||||
function delrights($rid, $allmodule='', $allperms='', $entity=0, $notrigger=0)
|
||||
{
|
||||
global $conf, $user, $langs;
|
||||
|
||||
@@ -565,7 +567,7 @@ class User extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
if (! $error && ! $notrigger)
|
||||
{
|
||||
$this->context = array('audit'=>$langs->trans("PermissionsDelete"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user