feat: Update user entity with role support
This commit is contained in:
@@ -29,10 +29,21 @@ module EuchreCamp
|
|||||||
confirmed && !locked?
|
confirmed && !locked?
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check if user is admin (for navigation purposes)
|
# Check user role
|
||||||
# This would be enhanced with actual role checking later
|
|
||||||
def admin?
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user