mirror of https://github.com/OCA/web.git
[IMP] web_notify
When trying to use the notify function that comes from a normal user with sudo flag enabled, it wasn't letting the user access it. Adding the su flag to the check should allow sudo users using this feature.pull/2676/head
parent
1716017222
commit
19b156c718
|
@ -79,7 +79,7 @@ class ResUsers(models.Model):
|
||||||
sticky=False,
|
sticky=False,
|
||||||
target=None,
|
target=None,
|
||||||
):
|
):
|
||||||
if not self.env.user._is_admin() and any(
|
if not (self.env.user._is_admin() or self.env.su) and any(
|
||||||
user.id != self.env.uid for user in self
|
user.id != self.env.uid for user in self
|
||||||
):
|
):
|
||||||
raise exceptions.UserError(
|
raise exceptions.UserError(
|
||||||
|
|
Loading…
Reference in New Issue