mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-03 20:30:30 +03:00
UI viewer role (#16978)
* db migration * db model * assign admin role on password reset * add role to jwt and api responses * don't restrict api access for admins yet * use json response * frontend auth context * update auth form for profile endpoint * add access denied page * add protected routes * auth hook * dialogs * user settings view * restrict viewer access to settings * restrict camera functions for viewer role * add password dialog to account menu * spacing tweak * migrator default to admin * escape quotes in migrator * ui tweaks * tweaks * colors * colors * fix merge conflict * fix icons * add api layer enforcement * ui tweaks * fix error message * debug * clean up * remove print * guard apis for admin only * fix tests * fix review tests * use correct error responses from api in toasts * add role to account menu
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import Heading from "@/components/ui/heading";
|
||||
import { useEffect } from "react";
|
||||
import { FaExclamationTriangle } from "react-icons/fa";
|
||||
|
||||
export default function AccessDenied() {
|
||||
useEffect(() => {
|
||||
document.title = "Access Denied - Frigate";
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col items-center justify-center text-center">
|
||||
<FaExclamationTriangle className="mb-4 size-8" />
|
||||
<Heading as="h2" className="mb-2">
|
||||
Access Denied
|
||||
</Heading>
|
||||
<p className="text-primary-variant">
|
||||
You don't have permission to view this page.
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user