Added ability to delete reports.

This commit is contained in:
Mike Cao 2023-07-30 00:11:26 -07:00
parent ad710cc86a
commit 95d824542f
8 changed files with 159 additions and 40 deletions

View file

@ -105,6 +105,10 @@ export async function canUpdateReport({ user }: Auth, report: Report) {
return user.id == report.userId;
}
export async function canDeleteReport(auth: Auth, report: Report) {
return canUpdateReport(auth, report);
}
export async function canCreateTeam({ user }: Auth) {
if (user.isAdmin) {
return true;