mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 15:10:27 +00:00
Merge branch 'custom_current_user' of https://github.com/benshalev849/PowerDNS-Admin into custom_current_user
This commit is contained in:
commit
6a402969ec
1
.github/workflows/mega-linter.yml
vendored
1
.github/workflows/mega-linter.yml
vendored
@ -6,6 +6,7 @@ name: MegaLinter
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
|
- "*"
|
||||||
- "dev"
|
- "dev"
|
||||||
- "main"
|
- "main"
|
||||||
- "master"
|
- "master"
|
||||||
|
@ -28,8 +28,8 @@ class Setting(db.Model):
|
|||||||
'allow_user_create_domain': False,
|
'allow_user_create_domain': False,
|
||||||
'allow_user_remove_domain': False,
|
'allow_user_remove_domain': False,
|
||||||
'allow_user_view_history': False,
|
'allow_user_view_history': False,
|
||||||
'delete_sso_accounts': False,
|
|
||||||
'custom_history_header': '',
|
'custom_history_header': '',
|
||||||
|
'delete_sso_accounts': False,
|
||||||
'bg_domain_updates': False,
|
'bg_domain_updates': False,
|
||||||
'enable_api_rr_history': True,
|
'enable_api_rr_history': True,
|
||||||
'preserve_history': False,
|
'preserve_history': False,
|
||||||
@ -45,7 +45,7 @@ class Setting(db.Model):
|
|||||||
'local_db_enabled': True,
|
'local_db_enabled': True,
|
||||||
'signup_enabled': True,
|
'signup_enabled': True,
|
||||||
'autoprovisioning': False,
|
'autoprovisioning': False,
|
||||||
'urn_value':'',
|
'urn_value': '',
|
||||||
'autoprovisioning_attribute': '',
|
'autoprovisioning_attribute': '',
|
||||||
'purge': False,
|
'purge': False,
|
||||||
'verify_user_email': False,
|
'verify_user_email': False,
|
||||||
@ -70,15 +70,19 @@ class Setting(db.Model):
|
|||||||
'github_oauth_scope': 'email',
|
'github_oauth_scope': 'email',
|
||||||
'github_oauth_api_url': 'https://api.github.com/user',
|
'github_oauth_api_url': 'https://api.github.com/user',
|
||||||
'github_oauth_token_url':
|
'github_oauth_token_url':
|
||||||
'https://github.com/login/oauth/access_token',
|
'https://github.com/login/oauth/access_token',
|
||||||
'github_oauth_authorize_url':
|
'github_oauth_authorize_url':
|
||||||
'https://github.com/login/oauth/authorize',
|
'https://github.com/login/oauth/authorize',
|
||||||
|
'github_oauth_jwks_url': '',
|
||||||
|
'github_oauth_metadata_url': '',
|
||||||
'google_oauth_enabled': False,
|
'google_oauth_enabled': False,
|
||||||
'google_oauth_client_id': '',
|
'google_oauth_client_id': '',
|
||||||
'google_oauth_client_secret': '',
|
'google_oauth_client_secret': '',
|
||||||
'google_token_url': 'https://oauth2.googleapis.com/token',
|
'google_token_url': 'https://oauth2.googleapis.com/token',
|
||||||
'google_oauth_scope': 'openid email profile',
|
'google_oauth_scope': 'openid email profile',
|
||||||
'google_authorize_url': 'https://accounts.google.com/o/oauth2/v2/auth',
|
'google_authorize_url': 'https://accounts.google.com/o/oauth2/v2/auth',
|
||||||
|
'google_oauth_jwks_url': '',
|
||||||
|
'google_oauth_metadata_url': '',
|
||||||
'google_base_url': 'https://www.googleapis.com/oauth2/v3/',
|
'google_base_url': 'https://www.googleapis.com/oauth2/v3/',
|
||||||
'azure_oauth_enabled': False,
|
'azure_oauth_enabled': False,
|
||||||
'azure_oauth_key': '',
|
'azure_oauth_key': '',
|
||||||
@ -86,9 +90,11 @@ class Setting(db.Model):
|
|||||||
'azure_oauth_scope': 'User.Read openid email profile',
|
'azure_oauth_scope': 'User.Read openid email profile',
|
||||||
'azure_oauth_api_url': 'https://graph.microsoft.com/v1.0/',
|
'azure_oauth_api_url': 'https://graph.microsoft.com/v1.0/',
|
||||||
'azure_oauth_token_url':
|
'azure_oauth_token_url':
|
||||||
'https://login.microsoftonline.com/[tenancy]/oauth2/v2.0/token',
|
'https://login.microsoftonline.com/[tenancy]/oauth2/v2.0/token',
|
||||||
'azure_oauth_authorize_url':
|
'azure_oauth_authorize_url':
|
||||||
'https://login.microsoftonline.com/[tenancy]/oauth2/v2.0/authorize',
|
'https://login.microsoftonline.com/[tenancy]/oauth2/v2.0/authorize',
|
||||||
|
'azure_oauth_jwks_url': '',
|
||||||
|
'azure_oauth_metadata_url': '',
|
||||||
'azure_sg_enabled': False,
|
'azure_sg_enabled': False,
|
||||||
'azure_admin_group': '',
|
'azure_admin_group': '',
|
||||||
'azure_operator_group': '',
|
'azure_operator_group': '',
|
||||||
@ -105,6 +111,7 @@ class Setting(db.Model):
|
|||||||
'oidc_oauth_api_url': '',
|
'oidc_oauth_api_url': '',
|
||||||
'oidc_oauth_token_url': '',
|
'oidc_oauth_token_url': '',
|
||||||
'oidc_oauth_authorize_url': '',
|
'oidc_oauth_authorize_url': '',
|
||||||
|
'oidc_oauth_jwks_url': '',
|
||||||
'oidc_oauth_metadata_url': '',
|
'oidc_oauth_metadata_url': '',
|
||||||
'oidc_oauth_logout_url': '',
|
'oidc_oauth_logout_url': '',
|
||||||
'oidc_oauth_username': 'preferred_username',
|
'oidc_oauth_username': 'preferred_username',
|
||||||
@ -285,7 +292,7 @@ class Setting(db.Model):
|
|||||||
result = self.query.filter(Setting.name == setting).first()
|
result = self.query.filter(Setting.name == setting).first()
|
||||||
|
|
||||||
if result is not None:
|
if result is not None:
|
||||||
if hasattr(result,'value'):
|
if hasattr(result, 'value'):
|
||||||
result = result.value
|
result = result.value
|
||||||
return strtobool(result) if result in [
|
return strtobool(result) if result in [
|
||||||
'True', 'False'
|
'True', 'False'
|
||||||
|
@ -1637,12 +1637,16 @@ def setting_authentication():
|
|||||||
request.form.get('google_oauth_client_id'))
|
request.form.get('google_oauth_client_id'))
|
||||||
Setting().set('google_oauth_client_secret',
|
Setting().set('google_oauth_client_secret',
|
||||||
request.form.get('google_oauth_client_secret'))
|
request.form.get('google_oauth_client_secret'))
|
||||||
|
Setting().set('google_oauth_metadata_url',
|
||||||
|
request.form.get('google_oauth_metadata_url'))
|
||||||
Setting().set('google_token_url',
|
Setting().set('google_token_url',
|
||||||
request.form.get('google_token_url'))
|
request.form.get('google_token_url'))
|
||||||
Setting().set('google_oauth_scope',
|
Setting().set('google_oauth_scope',
|
||||||
request.form.get('google_oauth_scope'))
|
request.form.get('google_oauth_scope'))
|
||||||
Setting().set('google_authorize_url',
|
Setting().set('google_authorize_url',
|
||||||
request.form.get('google_authorize_url'))
|
request.form.get('google_authorize_url'))
|
||||||
|
Setting().set('google_oauth_jwks_url',
|
||||||
|
request.form.get('google_oauth_jwks_url'))
|
||||||
Setting().set('google_base_url',
|
Setting().set('google_base_url',
|
||||||
request.form.get('google_base_url'))
|
request.form.get('google_base_url'))
|
||||||
result = {
|
result = {
|
||||||
@ -1670,10 +1674,14 @@ def setting_authentication():
|
|||||||
request.form.get('github_oauth_scope'))
|
request.form.get('github_oauth_scope'))
|
||||||
Setting().set('github_oauth_api_url',
|
Setting().set('github_oauth_api_url',
|
||||||
request.form.get('github_oauth_api_url'))
|
request.form.get('github_oauth_api_url'))
|
||||||
|
Setting().set('github_oauth_metadata_url',
|
||||||
|
request.form.get('github_oauth_metadata_url'))
|
||||||
Setting().set('github_oauth_token_url',
|
Setting().set('github_oauth_token_url',
|
||||||
request.form.get('github_oauth_token_url'))
|
request.form.get('github_oauth_token_url'))
|
||||||
Setting().set('github_oauth_authorize_url',
|
Setting().set('github_oauth_authorize_url',
|
||||||
request.form.get('github_oauth_authorize_url'))
|
request.form.get('github_oauth_authorize_url'))
|
||||||
|
Setting().set('github_oauth_jwks_url',
|
||||||
|
request.form.get('github_oauth_jwks_url'))
|
||||||
result = {
|
result = {
|
||||||
'status': True,
|
'status': True,
|
||||||
'msg':
|
'msg':
|
||||||
@ -1699,10 +1707,14 @@ def setting_authentication():
|
|||||||
request.form.get('azure_oauth_scope'))
|
request.form.get('azure_oauth_scope'))
|
||||||
Setting().set('azure_oauth_api_url',
|
Setting().set('azure_oauth_api_url',
|
||||||
request.form.get('azure_oauth_api_url'))
|
request.form.get('azure_oauth_api_url'))
|
||||||
|
Setting().set('azure_oauth_metadata_url',
|
||||||
|
request.form.get('azure_oauth_metadata_url'))
|
||||||
Setting().set('azure_oauth_token_url',
|
Setting().set('azure_oauth_token_url',
|
||||||
request.form.get('azure_oauth_token_url'))
|
request.form.get('azure_oauth_token_url'))
|
||||||
Setting().set('azure_oauth_authorize_url',
|
Setting().set('azure_oauth_authorize_url',
|
||||||
request.form.get('azure_oauth_authorize_url'))
|
request.form.get('azure_oauth_authorize_url'))
|
||||||
|
Setting().set('azure_oauth_jwks_url',
|
||||||
|
request.form.get('azure_oauth_jwks_url'))
|
||||||
Setting().set(
|
Setting().set(
|
||||||
'azure_sg_enabled', True
|
'azure_sg_enabled', True
|
||||||
if request.form.get('azure_sg_enabled') == 'ON' else False)
|
if request.form.get('azure_sg_enabled') == 'ON' else False)
|
||||||
@ -1750,12 +1762,14 @@ def setting_authentication():
|
|||||||
request.form.get('oidc_oauth_scope'))
|
request.form.get('oidc_oauth_scope'))
|
||||||
Setting().set('oidc_oauth_api_url',
|
Setting().set('oidc_oauth_api_url',
|
||||||
request.form.get('oidc_oauth_api_url'))
|
request.form.get('oidc_oauth_api_url'))
|
||||||
|
Setting().set('oidc_oauth_metadata_url',
|
||||||
|
request.form.get('oidc_oauth_metadata_url'))
|
||||||
Setting().set('oidc_oauth_token_url',
|
Setting().set('oidc_oauth_token_url',
|
||||||
request.form.get('oidc_oauth_token_url'))
|
request.form.get('oidc_oauth_token_url'))
|
||||||
Setting().set('oidc_oauth_authorize_url',
|
Setting().set('oidc_oauth_authorize_url',
|
||||||
request.form.get('oidc_oauth_authorize_url'))
|
request.form.get('oidc_oauth_authorize_url'))
|
||||||
Setting().set('oidc_oauth_metadata_url',
|
Setting().set('oidc_oauth_jwks_url',
|
||||||
request.form.get('oidc_oauth_metadata_url'))
|
request.form.get('oidc_oauth_jwks_url'))
|
||||||
Setting().set('oidc_oauth_logout_url',
|
Setting().set('oidc_oauth_logout_url',
|
||||||
request.form.get('oidc_oauth_logout_url'))
|
request.form.get('oidc_oauth_logout_url'))
|
||||||
Setting().set('oidc_oauth_username',
|
Setting().set('oidc_oauth_username',
|
||||||
|
@ -23,6 +23,8 @@ def azure_oauth():
|
|||||||
request_token_url=None,
|
request_token_url=None,
|
||||||
access_token_url=Setting().get('azure_oauth_token_url'),
|
access_token_url=Setting().get('azure_oauth_token_url'),
|
||||||
authorize_url=Setting().get('azure_oauth_authorize_url'),
|
authorize_url=Setting().get('azure_oauth_authorize_url'),
|
||||||
|
jwks_url=Setting().get('azure_oauth_jwks_url'),
|
||||||
|
server_metadata_url=Setting().get('azure_oauth_metadata_url'),
|
||||||
client_kwargs={'scope': Setting().get('azure_oauth_scope')},
|
client_kwargs={'scope': Setting().get('azure_oauth_scope')},
|
||||||
fetch_token=fetch_azure_token,
|
fetch_token=fetch_azure_token,
|
||||||
)
|
)
|
||||||
|
@ -24,6 +24,8 @@ def github_oauth():
|
|||||||
request_token_url=None,
|
request_token_url=None,
|
||||||
access_token_url=Setting().get('github_oauth_token_url'),
|
access_token_url=Setting().get('github_oauth_token_url'),
|
||||||
authorize_url=Setting().get('github_oauth_authorize_url'),
|
authorize_url=Setting().get('github_oauth_authorize_url'),
|
||||||
|
jwks_url=Setting().get('github_oauth_jwks_url'),
|
||||||
|
server_metadata_url=Setting().get('github_oauth_metadata_url'),
|
||||||
client_kwargs={'scope': Setting().get('github_oauth_scope')},
|
client_kwargs={'scope': Setting().get('github_oauth_scope')},
|
||||||
fetch_token=fetch_github_token,
|
fetch_token=fetch_github_token,
|
||||||
update_token=update_token)
|
update_token=update_token)
|
||||||
|
@ -23,6 +23,8 @@ def google_oauth():
|
|||||||
request_token_url=None,
|
request_token_url=None,
|
||||||
access_token_url=Setting().get('google_token_url'),
|
access_token_url=Setting().get('google_token_url'),
|
||||||
authorize_url=Setting().get('google_authorize_url'),
|
authorize_url=Setting().get('google_authorize_url'),
|
||||||
|
jwks_url=Setting().get('google_oauth_jwks_url'),
|
||||||
|
server_metadata_url=Setting().get('google_oauth_metadata_url'),
|
||||||
client_kwargs={'scope': Setting().get('google_oauth_scope')},
|
client_kwargs={'scope': Setting().get('google_oauth_scope')},
|
||||||
fetch_token=fetch_google_token,
|
fetch_token=fetch_google_token,
|
||||||
update_token=update_token)
|
update_token=update_token)
|
||||||
|
@ -23,6 +23,7 @@ def oidc_oauth():
|
|||||||
request_token_url=None,
|
request_token_url=None,
|
||||||
access_token_url=Setting().get('oidc_oauth_token_url'),
|
access_token_url=Setting().get('oidc_oauth_token_url'),
|
||||||
authorize_url=Setting().get('oidc_oauth_authorize_url'),
|
authorize_url=Setting().get('oidc_oauth_authorize_url'),
|
||||||
|
jwks_url=Setting().get('oidc_oauth_jwks_url'),
|
||||||
server_metadata_url=Setting().get('oidc_oauth_metadata_url'),
|
server_metadata_url=Setting().get('oidc_oauth_metadata_url'),
|
||||||
client_kwargs={'scope': Setting().get('oidc_oauth_scope')},
|
client_kwargs={'scope': Setting().get('oidc_oauth_scope')},
|
||||||
fetch_token=fetch_oidc_token,
|
fetch_token=fetch_oidc_token,
|
||||||
|
@ -630,9 +630,16 @@
|
|||||||
value="{{ SETTING.get('google_oauth_client_secret') }}">
|
value="{{ SETTING.get('google_oauth_client_secret') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
<div class="form-group">
|
||||||
<fieldset>
|
<label for="google_oauth_metadata_url">Metadata URL</label>
|
||||||
<legend>ADVANCE</legend>
|
<input type="text" class="form-control"
|
||||||
|
name="google_oauth_metadata_url"
|
||||||
|
id="google_oauth_metadata_url"
|
||||||
|
placeholder="e.g. https://{yourDomain}/.well-known/oauth-metadata.json"
|
||||||
|
data-error="Please input Metadata URL"
|
||||||
|
value="{{ SETTING.get('google_oauth_metadata_url') }}">
|
||||||
|
<span class="help-block with-errors"></span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="google_token_url">Token URL</label>
|
<label for="google_token_url">Token URL</label>
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
@ -663,6 +670,17 @@
|
|||||||
value="{{ SETTING.get('google_authorize_url') }}">
|
value="{{ SETTING.get('google_authorize_url') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="google_oauth_jwks_url">JWKS
|
||||||
|
URL</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
name="google_oauth_jwks_url"
|
||||||
|
id="google_oauth_jwks_url"
|
||||||
|
placeholder="e.g. https://{yourDomain}/.well-known/jwks.json"
|
||||||
|
data-error="Please input JWKS URL"
|
||||||
|
value="{{ SETTING.get('google_oauth_jwks_url') }}">
|
||||||
|
<span class="help-block with-errors"></span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="google_base_url">Base URL</label>
|
<label for="google_base_url">Base URL</label>
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
@ -750,9 +768,6 @@
|
|||||||
value="{{ SETTING.get('github_oauth_secret') }}">
|
value="{{ SETTING.get('github_oauth_secret') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
|
||||||
<fieldset>
|
|
||||||
<legend>ADVANCE</legend>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="github_oauth_scope">Scope</label>
|
<label for="github_oauth_scope">Scope</label>
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
@ -773,6 +788,16 @@
|
|||||||
value="{{ SETTING.get('github_oauth_api_url') }}">
|
value="{{ SETTING.get('github_oauth_api_url') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="github_oauth_metadata_url">Metadata URL</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
name="github_oauth_metadata_url"
|
||||||
|
id="github_oauth_metadata_url"
|
||||||
|
placeholder="e.g. https://{yourDomain}/.well-known/oauth-metadata.json"
|
||||||
|
data-error="Please input Metadata URL"
|
||||||
|
value="{{ SETTING.get('github_oauth_metadata_url') }}">
|
||||||
|
<span class="help-block with-errors"></span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="github_oauth_token_url">Token
|
<label for="github_oauth_token_url">Token
|
||||||
URL</label>
|
URL</label>
|
||||||
@ -791,10 +816,21 @@
|
|||||||
name="github_oauth_authorize_url"
|
name="github_oauth_authorize_url"
|
||||||
id="github_oauth_authorize_url"
|
id="github_oauth_authorize_url"
|
||||||
placeholder="e.g. https://github.com/login/oauth/authorize"
|
placeholder="e.g. https://github.com/login/oauth/authorize"
|
||||||
data-error="Plesae input Authorize URL"
|
data-error="Please input Authorize URL"
|
||||||
value="{{ SETTING.get('github_oauth_authorize_url') }}">
|
value="{{ SETTING.get('github_oauth_authorize_url') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="github_oauth_jwks_url">JWKS
|
||||||
|
URL</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
name="github_oauth_jwks_url"
|
||||||
|
id="github_oauth_jwks_url"
|
||||||
|
placeholder="e.g. https://{yourDomain}/.well-known/jwks.json"
|
||||||
|
data-error="Please input JWKS URL"
|
||||||
|
value="{{ SETTING.get('github_oauth_jwks_url') }}">
|
||||||
|
<span class="help-block with-errors"></span>
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<!-- /.card-body -->
|
<!-- /.card-body -->
|
||||||
@ -871,9 +907,6 @@
|
|||||||
value="{{ SETTING.get('azure_oauth_secret') }}">
|
value="{{ SETTING.get('azure_oauth_secret') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
|
||||||
<fieldset>
|
|
||||||
<legend>ADVANCED</legend>
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="azure_oauth_scope">Scope</label>
|
<label for="azure_oauth_scope">Scope</label>
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
@ -894,6 +927,16 @@
|
|||||||
value="{{ SETTING.get('azure_oauth_api_url') }}">
|
value="{{ SETTING.get('azure_oauth_api_url') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="azure_oauth_metadata_url">Metadata URL</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
name="azure_oauth_metadata_url"
|
||||||
|
id="azure_oauth_metadata_url"
|
||||||
|
placeholder="e.g. https://{yourDomain}/.well-known/oauth-metadata.json"
|
||||||
|
data-error="Please input Metadata URL"
|
||||||
|
value="{{ SETTING.get('azure_oauth_metadata_url') }}">
|
||||||
|
<span class="help-block with-errors"></span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="azure_oauth_token_url">Token URL</label>
|
<label for="azure_oauth_token_url">Token URL</label>
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
@ -915,6 +958,17 @@
|
|||||||
value="{{ SETTING.get('azure_oauth_authorize_url') }}">
|
value="{{ SETTING.get('azure_oauth_authorize_url') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="azure_oauth_jwks_url">JWKS
|
||||||
|
URL</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
name="azure_oauth_jwks_url"
|
||||||
|
id="azure_oauth_jwks_url"
|
||||||
|
placeholder="e.g. https://{yourDomain}/.well-known/jwks.json"
|
||||||
|
data-error="Please input JWKS URL"
|
||||||
|
value="{{ SETTING.get('azure_oauth_jwks_url') }}">
|
||||||
|
<span class="help-block with-errors"></span>
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>GROUP SECURITY</legend>
|
<legend>GROUP SECURITY</legend>
|
||||||
@ -1189,6 +1243,17 @@
|
|||||||
value="{{ SETTING.get('oidc_oauth_api_url') }}">
|
value="{{ SETTING.get('oidc_oauth_api_url') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="oidc_oauth_metadata_url">Metadata
|
||||||
|
URL</label>
|
||||||
|
<input type="text" class="form-control"
|
||||||
|
name="oidc_oauth_metadata_url"
|
||||||
|
id="oidc_oauth_metadata_url"
|
||||||
|
placeholder="e.g. https://oidc.com/login/oauth/.well-known/openid-configuration"
|
||||||
|
data-error="Please input Metadata URL"
|
||||||
|
value="{{ SETTING.get('oidc_oauth_metadata_url') }}">
|
||||||
|
<span class="help-block with-errors"></span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="oidc_oauth_token_url">Token URL</label>
|
<label for="oidc_oauth_token_url">Token URL</label>
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
@ -1206,19 +1271,19 @@
|
|||||||
name="oidc_oauth_authorize_url"
|
name="oidc_oauth_authorize_url"
|
||||||
id="oidc_oauth_authorize_url"
|
id="oidc_oauth_authorize_url"
|
||||||
placeholder="e.g. https://oidc.com/login/oauth/authorize"
|
placeholder="e.g. https://oidc.com/login/oauth/authorize"
|
||||||
data-error="Plesae input Authorize URL"
|
data-error="Please input Authorize URL"
|
||||||
value="{{ SETTING.get('oidc_oauth_authorize_url') }}">
|
value="{{ SETTING.get('oidc_oauth_authorize_url') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="oidc_oauth_metadata_url">Metadata
|
<label for="oidc_oauth_jwks_url">JWKS
|
||||||
URL</label>
|
URL</label>
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
name="oidc_oauth_metadata_url"
|
name="oidc_oauth_jwks_url"
|
||||||
id="oidc_oauth_metadata_url"
|
id="oidc_oauth_jwks_url"
|
||||||
placeholder="e.g. https://oidc.com/login/oauth/.well-known/openid-configuration"
|
placeholder="e.g. https://{yourDomain}/.well-known/jwks.json"
|
||||||
data-error="Plesae input Metadata URL"
|
data-error="Please input JWKS URL"
|
||||||
value="{{ SETTING.get('oidc_oauth_metadata_url') }}">
|
value="{{ SETTING.get('oidc_oauth_jwks_url') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -1234,7 +1299,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>CLAIMS</legend>
|
<legend>Claims</legend>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="oidc_oauth_username">Username</label>
|
<label for="oidc_oauth_username">Username</label>
|
||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
@ -1270,13 +1335,13 @@
|
|||||||
<input type="text" class="form-control"
|
<input type="text" class="form-control"
|
||||||
name="oidc_oauth_email" id="oidc_oauth_email"
|
name="oidc_oauth_email" id="oidc_oauth_email"
|
||||||
placeholder="e.g. email"
|
placeholder="e.g. email"
|
||||||
data-error="Plesae input Email claim"
|
data-error="Please input Email claim"
|
||||||
value="{{ SETTING.get('oidc_oauth_email') }}">
|
value="{{ SETTING.get('oidc_oauth_email') }}">
|
||||||
<span class="help-block with-errors"></span>
|
<span class="help-block with-errors"></span>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>ADVANCE</legend>
|
<legend>Advanced</legend>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="oidc_oauth_account_name_property">Autoprovision
|
<label for="oidc_oauth_account_name_property">Autoprovision
|
||||||
Account Name property</label>
|
Account Name property</label>
|
||||||
|
@ -101,14 +101,22 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
<li class="nav-header">Administration</li>
|
||||||
<li class="nav-header">Administration</li>
|
<li class="{{ 'nav-item active' if active_page == 'admin_global_search' else 'nav-item' }}">
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_global_search' else 'nav-item' }}">
|
<a href="{{ url_for('admin.global_search') }}" class="nav-link">
|
||||||
<a href="{{ url_for('admin.global_search') }}" class="nav-link">
|
<i class="nav-icon fa-solid fa-search"></i>
|
||||||
<i class="nav-icon fa-solid fa-search"></i>
|
<p>Global Search</p>
|
||||||
<p>Global Search</p>
|
</a>
|
||||||
|
</li>
|
||||||
|
{% if current_user.role.name in ['Administrator', 'Operator'] or SETTING.get('allow_user_view_history') %}
|
||||||
|
<li class="{{ 'nav-item active' if active_page == 'admin_history' else 'nav-item' }}">
|
||||||
|
<a href="{{ url_for('admin.history') }}" class="nav-link">
|
||||||
|
<i class="nav-icon fa-solid fa-timeline"></i>
|
||||||
|
<p>Activity</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if current_user.role.name in ['Administrator', 'Operator'] %}
|
||||||
<li class="{{ 'nav-item active' if active_page == 'server_statistics' else 'nav-item' }}">
|
<li class="{{ 'nav-item active' if active_page == 'server_statistics' else 'nav-item' }}">
|
||||||
<a href="{{ url_for('admin.server_statistics') }}" class="nav-link">
|
<a href="{{ url_for('admin.server_statistics') }}" class="nav-link">
|
||||||
<i class="nav-icon fa-solid fa-chart-simple"></i>
|
<i class="nav-icon fa-solid fa-chart-simple"></i>
|
||||||
@ -121,12 +129,6 @@
|
|||||||
<p>Server Configuration</p>
|
<p>Server Configuration</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_history' else 'nav-item' }}">
|
|
||||||
<a href="{{ url_for('admin.history') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fa-solid fa-timeline"></i>
|
|
||||||
<p>Activity</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_domain_template' else 'nav-item' }}">
|
<li class="{{ 'nav-item active' if active_page == 'admin_domain_template' else 'nav-item' }}">
|
||||||
<a href="{{ url_for('admin.templates') }}" class="nav-link">
|
<a href="{{ url_for('admin.templates') }}" class="nav-link">
|
||||||
<i class="nav-icon fa-solid fa-clone"></i>
|
<i class="nav-icon fa-solid fa-clone"></i>
|
||||||
@ -189,14 +191,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
{% elif SETTING.get('allow_user_view_history') %}
|
|
||||||
<li class="nav-header">Administration</li>
|
|
||||||
<li class="{{ 'nav-item active' if active_page == 'admin_history' else 'nav-item' }}">
|
|
||||||
<a href="{{ url_for('admin.history') }}" class="nav-link">
|
|
||||||
<i class="nav-icon fa-solid fa-calendar-alt"></i>
|
|
||||||
<p>History</p>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user