From 86de3af082ba6c541d9a6cb10c4db0d14f6267e8 Mon Sep 17 00:00:00 2001
From: Vitalii Lysak <v.lysak@dunice.net>
Date: Mon, 5 Sep 2022 15:56:39 +0300
Subject: add method for isNotAdmin

---
 src/views/_sila/SecurityAndAccess/Ldap/TableRoleGroups.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

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

diff --git a/src/views/_sila/SecurityAndAccess/Ldap/TableRoleGroups.vue b/src/views/_sila/SecurityAndAccess/Ldap/TableRoleGroups.vue
index 6168ae63..13247e24 100644
--- a/src/views/_sila/SecurityAndAccess/Ldap/TableRoleGroups.vue
+++ b/src/views/_sila/SecurityAndAccess/Ldap/TableRoleGroups.vue
@@ -11,10 +11,7 @@
       <b-col class="text-right" md="9">
         <b-btn
           variant="primary"
-          :disabled="
-            !isServiceEnabled ||
-            $store.getters['authentication/role'] === 'ReadOnly'
-          "
+          :disabled="!isServiceEnabled || isNotAdmin"
           @click="initRoleGroupModal(null)"
         >
           <icon-add />
@@ -162,6 +159,9 @@ export default {
   },
   computed: {
     ...mapGetters('ldap', ['isServiceEnabled', 'enabledRoleGroups']),
+    isNotAdmin() {
+      return this.$store.getters['authentication/role'] === 'ReadOnly';
+    },
     tableItems() {
       return this.enabledRoleGroups.map(({ LocalRole, RemoteGroup }) => {
         return {
-- 
cgit v1.2.3

