Skip to content
Snippets Groups Projects
Commit 2393c4cc authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Merge branch '363-rely-on-object-permissions-for-search-index' of...

Merge branch '363-rely-on-object-permissions-for-search-index' of https://edugit.org/AlekSIS/official/AlekSIS-Core into 363-rely-on-object-permissions-for-search-index
parents fb1a2057 61636a40
No related branches found
No related tags found
1 merge request!591Resolve "Rely on object permissions for search index"
Pipeline #11895 failed
......@@ -65,7 +65,6 @@ docs/_build/
aleksis/node_modules/
aleksis/static/
aleksis/whoosh_index/
aleksis/xapian_index/
.coverage
.mypy_cache/
......
......@@ -757,23 +757,11 @@ SILENCED_SYSTEM_CHECKS.append("guardian.W001")
# Append authentication backends
AUTHENTICATION_BACKENDS.append("rules.permissions.ObjectPermissionBackend")
HAYSTACK_BACKEND_SHORT = _settings.get("search.backend", "whoosh")
HAYSTACK_BACKEND_SHORT = "whoosh"
if HAYSTACK_BACKEND_SHORT == "simple":
HAYSTACK_CONNECTIONS = {
"default": {"ENGINE": "haystack.backends.simple_backend.SimpleEngine",},
}
elif HAYSTACK_BACKEND_SHORT == "xapian":
HAYSTACK_CONNECTIONS = {
"default": {
"ENGINE": "xapian_backend.XapianEngine",
"PATH": _settings.get("search.index", os.path.join(BASE_DIR, "xapian_index")),
},
}
elif HAYSTACK_BACKEND_SHORT == "whoosh":
HAYSTACK_CONNECTIONS = {
"default": {"ENGINE": "haystack_redis.RedisEngine", "PATH": REDIS_URL,},
}
HAYSTACK_CONNECTIONS = {
"default": {"ENGINE": "haystack_redis.RedisEngine", "PATH": REDIS_URL,},
}
HAYSTACK_SIGNAL_PROCESSOR = "celery_haystack.signals.CelerySignalProcessor"
CELERY_HAYSTACK_IGNORE_RESULT = True
......
This diff is collapsed.
......@@ -97,16 +97,13 @@ django-storages = {version = "^1.11.1", optional = true}
boto3 = {version = "^1.17.33", optional = true}
django-cleanup = "^5.1.0"
djangorestframework = "^3.12.4"
Whoosh = {version = "^2.7.4", optional = true}
xapian-haystack = {version = "^2.1.1", optional = true}
Whoosh = "^2.7.4"
django-titofisto = "^0.1.0"
haystack-redis = "^0.0.1"
[tool.poetry.extras]
ldap = ["django-auth-ldap"]
s3 = ["boto3", "django-storages"]
whoosh = ["whoosh"]
xapian = ["xapian-haystack"]
[tool.poetry.dev-dependencies]
aleksis-builddeps = "*"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment