mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-21 22:28:19 +02:00
Update user role for administrator accounts, ensuring proper access
Updates the admin role from "admin" to "administrator" in both the frontend (Dashboard.tsx) and backend (storage.ts) to fix access issues. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 4b008663-bd72-492b-b0b6-fa252367e730 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/4b008663-bd72-492b-b0b6-fa252367e730/Sg6WIVT
This commit is contained in:
1 parent
bf09dcb56b
commit
4a7edba1cb
3 files changed
+3
-3
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
@@ -92,7 +92,7 @@ function DashboardContent() {
|
|||||||
{user?.firstName} {user?.lastName}
|
{user?.firstName} {user?.lastName}
|
||||||
</p>
|
</p>
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
{user?.role === 'admin' && <Shield className="h-3 w-3 text-primary" />}
|
{user?.role === 'administrator' && <Shield className="h-3 w-3 text-primary" />}
|
||||||
<p className="text-xs text-muted-foreground capitalize">{user?.role}</p>
|
<p className="text-xs text-muted-foreground capitalize">{user?.role}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -176,7 +176,7 @@ export default function Dashboard() {
|
|||||||
return (
|
return (
|
||||||
<StoreProvider
|
<StoreProvider
|
||||||
userStoreId={user?.storeId}
|
userStoreId={user?.storeId}
|
||||||
isAdmin={user?.role === "admin"}
|
isAdmin={user?.role === "administrator"}
|
||||||
>
|
>
|
||||||
<DashboardContent />
|
<DashboardContent />
|
||||||
</StoreProvider>
|
</StoreProvider>
|
||||||
|
|||||||
+1
-1
@@ -347,7 +347,7 @@ export class DatabaseStorage implements IStorage {
|
|||||||
email: "admin@example.com",
|
email: "admin@example.com",
|
||||||
firstName: "Administrateur",
|
firstName: "Administrateur",
|
||||||
lastName: "Principal",
|
lastName: "Principal",
|
||||||
role: "admin",
|
role: "administrator",
|
||||||
storeId: defaultStore.id,
|
storeId: defaultStore.id,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user