do not allow sign in if team member is blocked
This commit is contained in:
@ -66,8 +66,9 @@ export const signup = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let memberUuid;
|
||||||
try {
|
try {
|
||||||
await getJavaUuid(input.teamMember);
|
memberUuid = await getJavaUuid(input.teamMember);
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
throw new ActionError({
|
throw new ActionError({
|
||||||
code: 'NOT_FOUND',
|
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) {
|
if (!teamDraft) {
|
||||||
// check if a team with the same name already exists
|
// check if a team with the same name already exists
|
||||||
|
Reference in New Issue
Block a user