feat: Update user entity with role support
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user