File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
backend/tests/integration/multitenant_tests/tenants Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change
1
+ from http import HTTPStatus
2
+
3
+ import requests
4
+
1
5
from onyx .configs .constants import DocumentSource
2
6
from onyx .db .enums import AccessType
3
7
from onyx .db .models import UserRole
8
+ from tests .integration .common_utils .constants import API_SERVER_URL
4
9
from tests .integration .common_utils .managers .cc_pair import CCPairManager
5
10
from tests .integration .common_utils .managers .connector import ConnectorManager
6
11
from tests .integration .common_utils .managers .credential import CredentialManager
@@ -80,3 +85,11 @@ def test_admin_can_create_and_verify_cc_pair(reset_multitenant: None) -> None:
80
85
81
86
# Verify cc_pair
82
87
CCPairManager .verify (cc_pair = test_cc_pair , user_performing_action = test_user )
88
+
89
+
90
+ def test_settings_access () -> None :
91
+ """Calls to the enterprise settings endpoint without authentication should fail with
92
+ 403 (and not 500, which will lock the web UI into a "maintenance mode" page)"""
93
+
94
+ response = requests .get (url = f"{ API_SERVER_URL } /enterprise-settings" )
95
+ assert response .status_code == HTTPStatus .FORBIDDEN
You can’t perform that action at this time.
0 commit comments