Aggiunge modulo Replay, Garage dev e YouTube a livello società.

Pipeline registrazione/upload con storage S3, archivio web e app, proxy replay
per il browser, OAuth YouTube sulla pagina club (Premium Full) e footer legale.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-03 07:53:11 +02:00
parent a87cda156b
commit 1f273f849d
87 changed files with 2952 additions and 195 deletions

View File

@@ -0,0 +1,33 @@
module Recordings
class AccessPolicy
def initialize(recording, viewer: nil)
@recording = recording
@viewer = viewer
end
def allowed?
return false if @recording.deleted?
return true if @recording.status == "processing" && (club_member? || manage_allowed?)
return false unless @recording.ready?
return true if @recording.unlisted? || @recording.publicly_listed?
club_member?
end
def manage_allowed?
return false unless @viewer
team = @recording.team
team.club.owned_by?(@viewer) || @viewer.manageable_teams.exists?(id: team.id)
end
private
def club_member?
return false unless @viewer
@recording.team.club.users.exists?(id: @viewer.id)
end
end
end