From b843b9345413ace6264da299e56569fbc3872c88 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 24 Jun 2025 11:44:13 +0530 Subject: [PATCH] fix: user with System Manager role is admin (cherry picked from commit b5ed9692dff4997335ae389ac4f836bedc3e7898) --- frontend/src/components/Settings/Users.vue | 2 +- frontend/src/stores/users.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Settings/Users.vue b/frontend/src/components/Settings/Users.vue index 6ea15809..dc07ac30 100644 --- a/frontend/src/components/Settings/Users.vue +++ b/frontend/src/components/Settings/Users.vue @@ -150,7 +150,7 @@ import { usersStore } from '@/stores/users' import { Avatar, TextInput, toast, call } from 'frappe-ui' import { ref, computed, h, onMounted } from 'vue' -const { users, getUserRole, isAdmin, isManager } = usersStore() +const { users, isAdmin, isManager } = usersStore() const showAddExistingModal = ref(false) const searchRef = ref(null) diff --git a/frontend/src/stores/users.js b/frontend/src/stores/users.js index 3614bda5..e0122f8a 100644 --- a/frontend/src/stores/users.js +++ b/frontend/src/stores/users.js @@ -50,7 +50,7 @@ export const usersStore = defineStore('crm-users', () => { } function isAdmin(email) { - return getUser(email).is_admin + return getUser(email).role === 'System Manager' || getUser(email).is_admin } function isManager(email) {