Sha256: 048e93f2126671cd35f79c0ee9dc4d72b1d6583665c4ec2753ec15f0c389b045
Contents?: true
Size: 818 Bytes
Versions: 7
Compression:
Stored size: 818 Bytes
Contents
class Ishapi::Ability include ::CanCan::Ability def initialize user # # signed in user # unless user.blank? if user.profile && user.profile.sudoer? can :manage, :all end can [ :show ], Gallery do |gallery| gallery.user == user end end # # anonymous user # user ||= User.new can [ :index, :show ], City can [ :index ], Gallery can [ :show ], Gallery do |gallery| gallery.is_public end can [ :index ], Report can [ :my_index, :show ], Report do |report| report.is_public end can [ :welcome_home, :fb_sign_in, :open_permission ], Ishapi can [ :index, :show ], Site can [ :index ], Venue can [ :show ], Venue do |venue| venue.is_public end end end
Version data entries
7 entries across 7 versions & 1 rubygems