mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-06-16 13:06:06 +00:00
Completed basic handling of authentication settings save process to the database.
This commit is contained in:
@ -10,19 +10,19 @@ let AuthenticationSettingsModel = function (user_data, api_url, csrf_token, sele
|
||||
|
||||
let defaults = {
|
||||
// Local Authentication Settings
|
||||
local_db_enabled: true,
|
||||
signup_enabled: true,
|
||||
pwd_enforce_characters: false,
|
||||
local_db_enabled: 1,
|
||||
signup_enabled: 1,
|
||||
pwd_enforce_characters: 0,
|
||||
pwd_min_len: 10,
|
||||
pwd_min_lowercase: 3,
|
||||
pwd_min_uppercase: 2,
|
||||
pwd_min_digits: 2,
|
||||
pwd_min_special: 1,
|
||||
pwd_enforce_complexity: false,
|
||||
pwd_enforce_complexity: 0,
|
||||
pwd_min_complexity: 11,
|
||||
|
||||
// LDAP Authentication Settings
|
||||
ldap_enabled: false,
|
||||
ldap_enabled: 0,
|
||||
ldap_type: 'ldap',
|
||||
ldap_uri: '',
|
||||
ldap_base_dn: '',
|
||||
@ -43,54 +43,54 @@ let AuthenticationSettingsModel = function (user_data, api_url, csrf_token, sele
|
||||
purge: 0,
|
||||
|
||||
// Google OAuth2 Settings
|
||||
google_oauth_enabled: false,
|
||||
google_oauth_enabled: 0,
|
||||
google_oauth_client_id: '',
|
||||
google_oauth_client_secret: '',
|
||||
google_oauth_scope: '',
|
||||
google_base_url: '',
|
||||
google_oauth_auto_configure: true,
|
||||
google_oauth_auto_configure: 1,
|
||||
google_oauth_metadata_url: '',
|
||||
google_token_url: '',
|
||||
google_authorize_url: '',
|
||||
|
||||
// GitHub OAuth2 Settings
|
||||
github_oauth_enabled: false,
|
||||
github_oauth_enabled: 0,
|
||||
github_oauth_key: '',
|
||||
github_oauth_secret: '',
|
||||
github_oauth_scope: '',
|
||||
github_oauth_api_url: '',
|
||||
github_oauth_auto_configure: false,
|
||||
github_oauth_auto_configure: 0,
|
||||
github_oauth_metadata_url: '',
|
||||
github_oauth_token_url: '',
|
||||
github_oauth_authorize_url: '',
|
||||
|
||||
// Azure AD OAuth2 Settings
|
||||
azure_oauth_enabled: false,
|
||||
azure_oauth_enabled: 0,
|
||||
azure_oauth_key: '',
|
||||
azure_oauth_secret: '',
|
||||
azure_oauth_scope: '',
|
||||
azure_oauth_api_url: '',
|
||||
azure_oauth_auto_configure: true,
|
||||
azure_oauth_auto_configure: 1,
|
||||
azure_oauth_metadata_url: '',
|
||||
azure_oauth_token_url: '',
|
||||
azure_oauth_authorize_url: '',
|
||||
azure_sg_enabled: false,
|
||||
azure_sg_enabled: 0,
|
||||
azure_admin_group: '',
|
||||
azure_operator_group: '',
|
||||
azure_user_group: '',
|
||||
azure_group_accounts_enabled: false,
|
||||
azure_group_accounts_enabled: 0,
|
||||
azure_group_accounts_name: '',
|
||||
azure_group_accounts_name_re: '',
|
||||
azure_group_accounts_description: '',
|
||||
azure_group_accounts_description_re: '',
|
||||
|
||||
// OIDC OAuth2 Settings
|
||||
oidc_oauth_enabled: false,
|
||||
oidc_oauth_enabled: 0,
|
||||
oidc_oauth_key: '',
|
||||
oidc_oauth_secret: '',
|
||||
oidc_oauth_scope: '',
|
||||
oidc_oauth_api_url: '',
|
||||
oidc_oauth_auto_configure: true,
|
||||
oidc_oauth_auto_configure: 1,
|
||||
oidc_oauth_metadata_url: '',
|
||||
oidc_oauth_token_url: '',
|
||||
oidc_oauth_authorize_url: '',
|
||||
@ -150,7 +150,7 @@ let AuthenticationSettingsModel = function (user_data, api_url, csrf_token, sele
|
||||
$.ajax({
|
||||
url: self.api_url,
|
||||
type: 'POST',
|
||||
data: {_csrf_token: csrf_token, commit: 1, data: JSON.parse(ko.toJSON(self))},
|
||||
data: {_csrf_token: csrf_token, commit: 1, data: ko.toJSON(self)},
|
||||
dataType: 'json',
|
||||
success: self.onDataSaved
|
||||
});
|
||||
|
Reference in New Issue
Block a user