Fix author not having tournament perms

This commit is contained in:
Kalle 2024-01-30 23:58:39 +02:00
parent 9fdf49438b
commit cfdc10f159

View File

@ -587,6 +587,8 @@ export class Tournament {
if (!user) return false;
if (isAdmin(user)) return true;
if (this.ctx.author.id === user.id) return true;
return this.ctx.staff.some(
(staff) => staff.id === user.id && staff.role === "ORGANIZER",
);
@ -596,6 +598,8 @@ export class Tournament {
if (!user) return false;
if (isAdmin(user)) return true;
if (this.ctx.author.id === user.id) return true;
return this.ctx.staff.some(
(staff) =>
staff.id === user.id && ["ORGANIZER", "STREAMER"].includes(staff.role),