From f2014fa010166e0ff28eade3b431ad3f9fdda887 Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Fri, 27 Mar 2026 13:09:53 -0700 Subject: [PATCH] feat: Update user entity with role support --- lib/euchre_camp/entities/user.rb | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/euchre_camp/entities/user.rb b/lib/euchre_camp/entities/user.rb index 791daf0..60722f4 100644 --- a/lib/euchre_camp/entities/user.rb +++ b/lib/euchre_camp/entities/user.rb @@ -29,10 +29,21 @@ module EuchreCamp confirmed && !locked? end - # Check if user is admin (for navigation purposes) - # This would be enhanced with actual role checking later + # Check user role def admin? - false # Placeholder - implement role checking later + role == 'club_admin' || role == 'system_admin' + end + + def tournament_admin? + role == 'tournament_admin' || admin? + end + + def club_admin? + role == 'club_admin' || role == 'system_admin' + end + + def player? + role == 'player' end end end