Skip to content

Commit

Permalink
fix mentor edit failures
Browse files Browse the repository at this point in the history
  • Loading branch information
c0repwn3r authored Nov 9, 2024
1 parent d725c77 commit 9d5dcd0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const actions: Actions = {
const form = await superValidate(event, zod(availSchema));

const { user } = (await loadUserData(event.cookies))!;
if (roleOf(user) < ROLE_STAFF) {
if (roleOf(user) < ROLE_STAFF && user.id != event.params.userId) {
return fail(403, { form });
}
if (!form.valid) {
Expand Down

0 comments on commit 9d5dcd0

Please sign in to comment.