Sha256: 2b6ffe3b91c4b89109fd0b5ddbf060ebc5b9f92efe3a67ca883a1322d7e3f820
Contents?: true
Size: 871 Bytes
Versions: 20
Compression:
Stored size: 871 Bytes
Contents
module KepplerFrontend # Policy for View model class ViewPolicy < ControllerPolicy attr_reader :user, :objects def initialize(user, objects) @user = user @objects = objects end def editor? keppler_admin? || user_can?(@objects, 'editor') end def editor_save? keppler_admin? || user_can?(@objects, 'editor_save') end def live_editor_save? keppler_admin? || user_can?(@objects, 'live_editor_save') end def select_theme_view? keppler_admin? || user_can?(@objects, 'select_theme_view') end def multimedia? keppler_admin? || user_can?(@objects, 'multimedia') end def upload_multimedia? keppler_admin? || user_can?(@objects, 'upload_multimedia') end def destroy_callback? keppler_admin? || user_can?(@objects, 'destroy_callback') end end end
Version data entries
20 entries across 20 versions & 1 rubygems