Add user to get keyword cache

Since d41d48d68cdf model access is checked for window actions. So the returned
keywords depend on the user access rights.

Closes #12580
This commit is contained in:
Cédric Krier
2023-09-20 09:59:02 +02:00
parent 3333a35bda
commit 0ff2fb5651
+2 -1
View File
@@ -257,7 +257,8 @@ class ActionKeyword(ModelSQL, ModelView):
Action = pool.get('ir.action')
Menu = pool.get('ir.ui.menu')
ModelAccess = pool.get('ir.model.access')
key = (keyword, tuple(value))
user = Transaction().user
key = (user, keyword, tuple(value))
keywords = cls._get_keyword_cache.get(key)
if keywords is not None:
return keywords