Commit 03e45a5f authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Use startswith for detect dictionaries query.

parent 5dd48a7d
Pipeline #2846 passed with stage
in 12 seconds
......@@ -206,7 +206,7 @@ class Model(six.with_metaclass(ModelBase)):
"""
if not user or user.is_superuser:
return query # No restrictions
if "dictionaries." in query["datasource"]:
if query["datasource"].startswith("dictionaries."):
return query # To dictionaries
# Get user domains
domains = UserAccess.get_domains(user)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment