🚩(frontend) feature flag on blocking edition
If users were not connected to the collaboration server, they were not be able to edit documents. We decided to add a feature flag on this feature as it can be quite restrictive. We can now enable or disable this feature at runtime thanks to the env variable "COLLABORATION_WS_NOT_CONNECTED_READY_ONLY".
This commit is contained in:
@@ -1785,6 +1785,7 @@ class ConfigView(drf.views.APIView):
|
||||
array_settings = [
|
||||
"AI_FEATURE_ENABLED",
|
||||
"COLLABORATION_WS_URL",
|
||||
"COLLABORATION_WS_NOT_CONNECTED_READY_ONLY",
|
||||
"CRISP_WEBSITE_ID",
|
||||
"ENVIRONMENT",
|
||||
"FRONTEND_CSS_URL",
|
||||
|
||||
@@ -20,6 +20,7 @@ pytestmark = pytest.mark.django_db
|
||||
@override_settings(
|
||||
AI_FEATURE_ENABLED=False,
|
||||
COLLABORATION_WS_URL="http://testcollab/",
|
||||
COLLABORATION_WS_NOT_CONNECTED_READY_ONLY=True,
|
||||
CRISP_WEBSITE_ID="123",
|
||||
FRONTEND_CSS_URL="http://testcss/",
|
||||
FRONTEND_THEME="test-theme",
|
||||
@@ -41,6 +42,7 @@ def test_api_config(is_authenticated):
|
||||
assert response.status_code == HTTP_200_OK
|
||||
assert response.json() == {
|
||||
"COLLABORATION_WS_URL": "http://testcollab/",
|
||||
"COLLABORATION_WS_NOT_CONNECTED_READY_ONLY": True,
|
||||
"CRISP_WEBSITE_ID": "123",
|
||||
"ENVIRONMENT": "test",
|
||||
"FRONTEND_CSS_URL": "http://testcss/",
|
||||
|
||||
@@ -413,6 +413,11 @@ class Base(Configuration):
|
||||
COLLABORATION_WS_URL = values.Value(
|
||||
None, environ_name="COLLABORATION_WS_URL", environ_prefix=None
|
||||
)
|
||||
COLLABORATION_WS_NOT_CONNECTED_READY_ONLY = values.BooleanValue(
|
||||
False,
|
||||
environ_name="COLLABORATION_WS_NOT_CONNECTED_READY_ONLY",
|
||||
environ_prefix=None,
|
||||
)
|
||||
|
||||
# Frontend
|
||||
FRONTEND_THEME = values.Value(
|
||||
|
||||
Reference in New Issue
Block a user