last update

This commit is contained in:
Ehsan
2025-06-08 10:13:06 +03:30
parent 7d6a9e6e33
commit f52eb43326
13 changed files with 81 additions and 62 deletions
+11 -1
View File
@@ -1,6 +1,16 @@
import ContentLogin from "@/components/register/ContentLogin";
import { defineAbilitiesFor } from "@/lib/ability";
import { getUser } from "@/lib/auth";
import { redirect } from "next/navigation";
async function LogIn() {
const user = await getUser();
const ability = defineAbilitiesFor(user);
if (!ability.can("access", "Login")) {
return redirect("/");
}
function LogIn() {
return <ContentLogin />;
}