Skip to content

Commit

Permalink
fix: do not set administrator as default user
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Dec 11, 2023
1 parent 0dcd5b9 commit c600b0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/stores/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ export const usersStore = defineStore('crm-users', () => {
function getUser(email) {
if (!email || email === 'sessionUser') {
email = session.user

if (email === 'Administrator' && users.data.length > 2) {
email = users.data.filter(
(user) => !['Administrator', 'Guest'].includes(user.name)
)[0].name
}
}
if (!usersByName[email]) {
usersByName[email] = {
Expand Down

0 comments on commit c600b0b

Please sign in to comment.