Club come entità principale, branding e fix infrastruttura streaming.
Introduce clubs con abbonamento, branding Active Storage e flusso registrazione società; corregge healthcheck MediaMTX (immagine distroless) e allinea dominio produzione matchlivetv.it. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,9 +10,12 @@ module Public
|
||||
redirect_to public_login_path, alert: "Accedi per continuare"
|
||||
end
|
||||
|
||||
def require_team_owner!(team)
|
||||
membership = current_user.user_teams.find_by(team: team)
|
||||
redirect_to public_prezzi_path, alert: "Accesso non consentito" unless membership&.role == "owner"
|
||||
def require_club_owner!(club)
|
||||
redirect_to public_prezzi_path, alert: "Accesso non consentito" unless club.owned_by?(current_user)
|
||||
end
|
||||
|
||||
def require_club_owner_for_team!(team)
|
||||
redirect_to public_prezzi_path, alert: "Accesso non consentito" unless team.club&.owned_by?(current_user)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user