Sha256: 70ed847e83baae3ff33a7de5268fb4f99671e3768c051a5d68ff9d0f4b09d4f3
Contents?: true
Size: 431 Bytes
Versions: 3
Compression:
Stored size: 431 Bytes
Contents
module Clubhouse module Concerns module Policies module Ownable extend ActiveSupport::Concern private def admin? owner.admin?(user) end def member? owner.member?(user) end def owner @owner ||= if collection? parent else resource.organization end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
clubhouse-0.3.0 | lib/clubhouse/concerns/policies/ownable.rb |
clubhouse-0.2.0 | lib/clubhouse/concerns/policies/ownable.rb |
clubhouse-0.1.0 | lib/clubhouse/concerns/policies/ownable.rb |