mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[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.
This commit is contained in:
committed by
trisdoan
parent
072e936ca5
commit
22c57589fa
@@ -106,7 +106,7 @@ class ResUsers(models.Model):
|
||||
target=None,
|
||||
action=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
|
||||
):
|
||||
raise exceptions.UserError(
|
||||
|
||||
Reference in New Issue
Block a user