Skip to content

Commit e83cb6b

Browse files
committed
Move behind dedicated permission
1 parent eabfc78 commit e83cb6b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

app/(authenticated)/user/[id]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export default async function ArbitraryUserPage({
66
}: {
77
params: { id: string };
88
}) {
9-
await requirePermission("Admin.Users");
9+
await requirePermission("People.ViewProfile.All");
1010
return <UserPage id={parseInt(params.id, 10)} />;
1111
}

lib/auth/permissions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { z } from "zod";
44
* Available permissions. Should contain all the ones that users are expected
55
* to have, along with some special ones:
66
* * MEMBER - any logged in user
7-
* * PUBLIC - open to the world with no authentication
7+
* * PUBLIC - open to the world with no authentication (not implemented)
88
* * SuperUser - can do anything (don't use this unless you know what you're doing)
99
*/
1010
export const PermissionEnum = z.enum([
@@ -27,6 +27,7 @@ export const PermissionEnum = z.enum([
2727
"CheckWithTech.Submit",
2828
"CheckWithTech.Admin",
2929
"ManageQuotes",
30+
"People.ViewProfile.All",
3031
"Admin.Users",
3132
"Admin.Roles",
3233
"Admin.Positions",

0 commit comments

Comments
 (0)