1
0
Fork 0
mirror of https://codeberg.org/MarkusThielker/next-ory.git synced 2025-04-16 13:49:28 +00:00

NORY-59: fix permission in delete-identity server action

This commit is contained in:
Markus Thielker 2025-04-06 17:59:45 +02:00
parent 5494233e59
commit 3151103195

View file

@ -286,7 +286,7 @@ export async function unblockIdentity(id: string) {
export async function deleteIdentity(id: string) { export async function deleteIdentity(id: string) {
const session = await requireSession(); const session = await requireSession();
const allowed = await checkPermission(permission.user.credential, relation.delete, session.identity!.id); const allowed = await checkPermission(permission.user.it, relation.delete, session.identity!.id);
if (!allowed) { if (!allowed) {
throw Error('Unauthorised'); throw Error('Unauthorised');
} }