non-admins can't see permits administrative UI
This commit is contained in:
@ -5,6 +5,7 @@ import path from 'path';
|
|||||||
import { url } from 'inspector';
|
import { url } from 'inspector';
|
||||||
import ProtectedRoute, { serverSideAuth } from "/components/protectedRoute";
|
import ProtectedRoute, { serverSideAuth } from "/components/protectedRoute";
|
||||||
import axiosInstance from '../src/axiosSecure';
|
import axiosInstance from '../src/axiosSecure';
|
||||||
|
import { UserRole } from "@prisma/client";
|
||||||
|
|
||||||
|
|
||||||
const PDFViewerPage = ({ pdfFiles }) => {
|
const PDFViewerPage = ({ pdfFiles }) => {
|
||||||
@ -42,7 +43,7 @@ const PDFViewerPage = ({ pdfFiles }) => {
|
|||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<h1 className="text-3xl font-bold p-4 pt-8">Разрешителни</h1>
|
<h1 className="text-3xl font-bold p-4 pt-8">Разрешителни</h1>
|
||||||
<ProtectedRoute>
|
<ProtectedRoute allowedRoles={[UserRole.ADMIN]} deniedMessage="">
|
||||||
<input type="file" onChange={handleFileUpload} className="mb-4" />
|
<input type="file" onChange={handleFileUpload} className="mb-4" />
|
||||||
{files.map((file, index) => (
|
{files.map((file, index) => (
|
||||||
<div key={file.name} className="py-2">
|
<div key={file.name} className="py-2">
|
||||||
|
Reference in New Issue
Block a user