do not allow sign in if team member is blocked
All checks were successful
deploy / build-and-deploy (/testvaro, /opt/website-test, website-test) (push) Successful in 14s
deploy / build-and-deploy (/varo, /opt/website, website) (push) Successful in 14s

This commit is contained in:
2025-06-10 11:50:52 +02:00
parent 057a287277
commit 0a513d2350

View File

@ -66,8 +66,9 @@ export const signup = {
});
}
let memberUuid;
try {
await getJavaUuid(input.teamMember);
memberUuid = await getJavaUuid(input.teamMember);
} catch (_) {
throw new ActionError({
code: 'NOT_FOUND',
@ -85,6 +86,15 @@ export const signup = {
});
}
}
if (memberUuid) {
const blockedUser = await db.getBlockedUserByUuid({ uuid: memberUuid });
if (blockedUser) {
throw new ActionError({
code: 'FORBIDDEN',
message: 'Dein Mitspieler ist für die Registrierung gesperrt. Bitte suche dir einen anderen Mitspieler'
});
}
}
if (!teamDraft) {
// check if a team with the same name already exists