summaryrefslogtreecommitdiff
path: root/src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue
diff options
context:
space:
mode:
authorVitalii Lysak <v.lysak@dunice.net>2022-08-10 15:46:15 +0300
committerVitalii Lysak <v.lysak@dunice.net>2022-08-10 15:46:15 +0300
commitb4d1fb8b8e6e6cdb7be76a2d4fa0d2b9a84f3ba2 (patch)
tree8806fa43f2e0d1301a89ddd4c7667d10568e531f /src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue
parent5fff754d48ec658673c11f8e593d3af4f94d79df (diff)
downloadwebui-vue-b4d1fb8b8e6e6cdb7be76a2d4fa0d2b9a84f3ba2.tar.xz
SILABMC-236: upd layput for ReadOnly role
Diffstat (limited to 'src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue')
-rw-r--r--src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue33
1 files changed, 31 insertions, 2 deletions
diff --git a/src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue b/src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue
index 6800ead5..12584fac 100644
--- a/src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue
+++ b/src/views/_sila/SecurityAndAccess/Ldap/Ldap.vue
@@ -13,6 +13,7 @@
<b-form-checkbox
v-model="form.ldapAuthenticationEnabled"
data-test-id="ldap-checkbox-ldapAuthenticationEnabled"
+ :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
@change="onChangeldapAuthenticationEnabled"
>
{{ $t('global.action.enable') }}
@@ -42,7 +43,9 @@
aria-describedby="enable-secure-help-block"
data-test-id="ldap-checkbox-secureLdapEnabled"
:disabled="
- !caCertificateExpiration || !ldapCertificateExpiration
+ !caCertificateExpiration ||
+ !ldapCertificateExpiration ||
+ $store.getters['authentication/role'] === 'ReadOnly'
"
@change="$v.form.secureLdapEnabled.$touch()"
>
@@ -76,6 +79,9 @@
v-model="form.activeDirectoryEnabled"
data-test-id="ldap-radio-activeDirectoryEnabled"
:value="false"
+ :disabled="
+ $store.getters['authentication/role'] === 'ReadOnly'
+ "
@change="onChangeServiceType"
>
OpenLDAP
@@ -84,6 +90,9 @@
v-model="form.activeDirectoryEnabled"
data-test-id="ldap-radio-activeDirectoryEnabled"
:value="true"
+ :disabled="
+ $store.getters['authentication/role'] === 'ReadOnly'
+ "
@change="onChangeServiceType"
>
Active Directory
@@ -106,6 +115,9 @@
v-model="form.serverUri"
data-test-id="ldap-input-serverUri"
:state="getValidationState($v.form.serverUri)"
+ :disabled="
+ $store.getters['authentication/role'] === 'ReadOnly'
+ "
@change="$v.form.serverUri.$touch()"
/>
<b-form-invalid-feedback role="alert">
@@ -124,6 +136,9 @@
v-model="form.bindDn"
data-test-id="ldap-input-bindDn"
:state="getValidationState($v.form.bindDn)"
+ :disabled="
+ $store.getters['authentication/role'] === 'ReadOnly'
+ "
@change="$v.form.bindDn.$touch()"
/>
<b-form-invalid-feedback role="alert">
@@ -145,6 +160,9 @@
type="password"
:state="getValidationState($v.form.bindPassword)"
class="form-control-with-button"
+ :disabled="
+ $store.getters['authentication/role'] === 'ReadOnly'
+ "
@change="$v.form.bindPassword.$touch()"
/>
<b-form-invalid-feedback role="alert">
@@ -163,6 +181,9 @@
v-model="form.baseDn"
data-test-id="ldap-input-baseDn"
:state="getValidationState($v.form.baseDn)"
+ :disabled="
+ $store.getters['authentication/role'] === 'ReadOnly'
+ "
@change="$v.form.baseDn.$touch()"
/>
<b-form-invalid-feedback role="alert">
@@ -182,6 +203,9 @@
id="user-id-attribute"
v-model="form.userIdAttribute"
data-test-id="ldap-input-userIdAttribute"
+ :disabled="
+ $store.getters['authentication/role'] === 'ReadOnly'
+ "
@change="$v.form.userIdAttribute.$touch()"
/>
</b-form-group>
@@ -198,6 +222,9 @@
id="group-id-attribute"
v-model="form.groupIdAttribute"
data-test-id="ldap-input-groupIdAttribute"
+ :disabled="
+ $store.getters['authentication/role'] === 'ReadOnly'
+ "
@change="$v.form.groupIdAttribute.$touch()"
/>
</b-form-group>
@@ -213,7 +240,9 @@
variant="primary"
type="submit"
data-test-id="ldap-button-saveSettings"
- :disabled="loading"
+ :disabled="
+ loading || $store.getters['authentication/role'] === 'ReadOnly'
+ "
>
{{ $t('global.action.saveSettings') }}
</b-btn>