From b4d1fb8b8e6e6cdb7be76a2d4fa0d2b9a84f3ba2 Mon Sep 17 00:00:00 2001
From: Vitalii Lysak <v.lysak@dunice.net>
Date: Wed, 10 Aug 2022 15:46:15 +0300
Subject: SILABMC-236: upd layput for ReadOnly role

---
 src/views/_sila/Overview/Network/NetworkGlobalSettings.vue | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src/views/_sila/Overview/Network/NetworkGlobalSettings.vue')

diff --git a/src/views/_sila/Overview/Network/NetworkGlobalSettings.vue b/src/views/_sila/Overview/Network/NetworkGlobalSettings.vue
index 44035ae6..6a08c2c2 100644
--- a/src/views/_sila/Overview/Network/NetworkGlobalSettings.vue
+++ b/src/views/_sila/Overview/Network/NetworkGlobalSettings.vue
@@ -8,7 +8,12 @@
         <dl>
           <dt>
             {{ $t('pageNetwork.hostname') }}
-            <b-button variant="link" class="p-1" @click="initSettingsModal()">
+            <b-button
+              variant="link"
+              class="p-1"
+              :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
+              @click="initSettingsModal()"
+            >
               <icon-edit :title="$t('pageNetwork.modal.editHostnameTitle')" />
             </b-button>
           </dt>
@@ -24,6 +29,7 @@
               v-model="useDomainNameState"
               data-test-id="networkSettings-switch-useDomainName"
               switch
+              :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
               @change="changeDomainNameState"
             >
               <span v-if="useDomainNameState">
@@ -43,6 +49,7 @@
               v-model="useDnsState"
               data-test-id="networkSettings-switch-useDns"
               switch
+              :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
               @change="changeDnsState"
             >
               <span v-if="useDnsState">
@@ -62,6 +69,7 @@
               v-model="useNtpState"
               data-test-id="networkSettings-switch-useNtp"
               switch
+              :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
               @change="changeNtpState"
             >
               <span v-if="useNtpState">
-- 
cgit v1.2.3

