Sha256: dbb2b22ea91ba9e63df3a42b3232b8f2a02c5cb09f6c5084fba3a9e3ad1bec3c
Contents?: true
Size: 490 Bytes
Versions: 7
Compression:
Stored size: 490 Bytes
Contents
module Policies class ColaborationPolicy < Walruz::Policy def authorized?(author, song) case author when Colaboration song.author == author when Beatle if song.author.is_a?(Beatle) song.author == author else return false unless song.author.beatles.include?(author) [true, { :is_colaboration? => true, :colaboration => song.author }] end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems