Skip to content

Commit

Permalink
fix: Исправил хеширование паролей инициализированных пользователей
Browse files Browse the repository at this point in the history
  • Loading branch information
Dlexeyn committed Nov 19, 2024
1 parent e661ad1 commit 9ec2e73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions backend/init_users.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from dao.user import create_user, find_user_by_email
from schemas.user import UserCreateSchema, Role
from utils.password import get_password_hash


async def create_users():
Expand All @@ -8,7 +9,7 @@ async def create_users():
lastname='Петров',
middlename='Александрович',
email='[email protected]',
password='admin123',
password=get_password_hash('admin123'),
role=Role.admin
)

Expand All @@ -17,7 +18,7 @@ async def create_users():
lastname='Смирнова',
middlename='Ивановна',
email='[email protected]',
password='securepassword1',
password=get_password_hash('securepassword1'),
role=Role.foreman
)

Expand All @@ -26,7 +27,7 @@ async def create_users():
lastname='Кузнецов',
middlename='Петрович',
email='[email protected]',
password='securepassword2',
password=get_password_hash('securepassword2'),
role=Role.worker
)

Expand All @@ -35,7 +36,7 @@ async def create_users():
lastname='Сидоров',
middlename='Леонидович',
email='[email protected]',
password='securepassword3',
password=get_password_hash('securepassword3'),
role=Role.customer
)

Expand Down
8 changes: 4 additions & 4 deletions frontend/src/src/components/bars/StaticSidebarComponent.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<template>
<aside class="sidebar">
<button v-if="!isMainPage" @click="goToMain" class="to-main-button">На основную</button>
<div v-if="isCustomer" class="menu-item" @click="goToStatistics">
<img src="@/assets/icons/statics.png" alt="Static Icon" class="static-icon">
<p>Статистика</p>
</div>
<!-- <div v-if="isCustomer" class="menu-item" @click="goToStatistics">-->
<!-- <img src="@/assets/icons/statics.png" alt="Static Icon" class="static-icon">-->
<!-- <p>Статистика</p>-->
<!-- </div>-->
<div class="menu-item logout-item" @click="logOut">
<img src="@/assets/icons/logout.png" alt="Logout Icon" class="logout-icon">
</div>
Expand Down

0 comments on commit 9ec2e73

Please sign in to comment.