feat: saml2协议单点登录支持在页面上配置saml2协议的高级配置 (#7362)

This commit is contained in:
jiangweidong
2021-12-13 10:54:14 +08:00
committed by GitHub
parent 84924bc3f6
commit c5013dcbd6
4 changed files with 10 additions and 10 deletions

View File

@@ -92,14 +92,11 @@ class PrepareRequestMixin:
@staticmethod
def get_advanced_settings():
other_settings = {}
other_settings_path = settings.SAML2_OTHER_SETTINGS_PATH
if os.path.exists(other_settings_path):
with open(other_settings_path, 'r') as json_data:
try:
other_settings = json.loads(json_data.read())
except Exception as error:
logger.error('Get other settings error: %s', error)
try:
other_settings = dict(settings.SAML2_SP_ADVANCED_SETTINGS)
except Exception as error:
logger.error('Get other settings error: %s', error)
other_settings = {}
default = {
"organization": {