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

---
 .../SecurityAndAccess/UserManagement/UserManagement.vue      | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

(limited to 'src/views/_sila/SecurityAndAccess/UserManagement/UserManagement.vue')

diff --git a/src/views/_sila/SecurityAndAccess/UserManagement/UserManagement.vue b/src/views/_sila/SecurityAndAccess/UserManagement/UserManagement.vue
index ae8c5209..e65b00df 100644
--- a/src/views/_sila/SecurityAndAccess/UserManagement/UserManagement.vue
+++ b/src/views/_sila/SecurityAndAccess/UserManagement/UserManagement.vue
@@ -3,13 +3,18 @@
     <page-title />
     <b-row>
       <b-col xl="9" class="text-right">
-        <b-button variant="link" @click="initModalSettings">
+        <b-button
+          variant="link"
+          :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
+          @click="initModalSettings"
+        >
           <icon-settings />
           {{ $t('pageUserManagement.accountPolicySettings') }}
         </b-button>
         <b-button
           variant="primary"
           data-test-id="userManagement-button-addUser"
+          :disabled="$store.getters['authentication/role'] === 'ReadOnly'"
           @click="initModalUser(null)"
         >
           <icon-add />
@@ -68,6 +73,11 @@
               :value="action.value"
               :enabled="action.enabled"
               :title="action.title"
+              :class="{
+                disabledDiv:
+                  $store.getters['authentication/role'] === 'ReadOnly' &&
+                  (action.value === 'delete' || action.value === 'edit'),
+              }"
               @click-table-action="onTableRowAction($event, item)"
             >
               <template #icon>
-- 
cgit v1.2.3

