Merge pull request #957 from shariquerik/users-fix
This commit is contained in:
commit
2d05b6a282
@ -150,7 +150,7 @@ import { usersStore } from '@/stores/users'
|
|||||||
import { Avatar, TextInput, toast, call } from 'frappe-ui'
|
import { Avatar, TextInput, toast, call } from 'frappe-ui'
|
||||||
import { ref, computed, h, onMounted } from 'vue'
|
import { ref, computed, h, onMounted } from 'vue'
|
||||||
|
|
||||||
const { users, getUserRole, isAdmin, isManager } = usersStore()
|
const { users, isAdmin, isManager } = usersStore()
|
||||||
|
|
||||||
const showAddExistingModal = ref(false)
|
const showAddExistingModal = ref(false)
|
||||||
const searchRef = ref(null)
|
const searchRef = ref(null)
|
||||||
|
|||||||
@ -50,7 +50,7 @@ export const usersStore = defineStore('crm-users', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isAdmin(email) {
|
function isAdmin(email) {
|
||||||
return getUser(email).is_admin
|
return getUser(email).role === 'System Manager' || getUser(email).is_admin
|
||||||
}
|
}
|
||||||
|
|
||||||
function isManager(email) {
|
function isManager(email) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user