Skip to content

Commit

Permalink
[FIX] Access rights
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonnerue committed Jan 24, 2025
1 parent 42d551e commit cd1a1be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions multisearch_field/monkeypatching.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
def search(self, domain, offset=0, limit=None, order=None, count=False):
"""Override of the Python method to remove the dependency of the unit
fields"""
if self.env["ir.model.access"].check_access_rights("read", raise_exception=False):
list_separator = self.env["ir.config_parameter"].get_param(
"multi_search_separator"
if self.check_access_rights("read"):
list_separator = (
self.env["ir.config_parameter"].sudo().get_param("multi_search_separator")
)
else:
list_separator = False

Check warning on line 20 in multisearch_field/monkeypatching.py

View check run for this annotation

Codecov / codecov/patch

multisearch_field/monkeypatching.py#L20

Added line #L20 was not covered by tests
Expand Down

0 comments on commit cd1a1be

Please sign in to comment.