feat: add recalculateAllElo function for idempotent ELO recalculation

This commit is contained in:
2026-03-30 21:28:09 -07:00
parent 04a42c903b
commit 3a78f354ad
7 changed files with 594 additions and 61 deletions
+14
View File
@@ -215,3 +215,17 @@ export async function getManageableTournaments() {
orderBy: { createdAt: 'desc' }
});
}
/**
* Check if the user can edit user profiles (only club_admin)
*/
export async function canEditUserProfiles(): Promise<PermissionCheck> {
return hasRole('club_admin');
}
/**
* Check if the user can recalculate ELO ratings (only club_admin)
*/
export async function canRecalculateElo(): Promise<PermissionCheck> {
return hasRole('club_admin');
}