Sha256: 917f9406ff9199097b3805eb5b5c494321eee040309dc1f707d647777d35b014

Contents?: true

Size: 485 Bytes

Versions: 11

Compression:

Stored size: 485 Bytes

Contents

module Alchemy
  class AjaxFormAbility
    include CanCan::Ability

    def initialize(user)

      if user.present? && user.is_admin?
        # can :manage, ::UserSiteRegistration
        # can :manage, :admin_user_site_registrations

        can :manage, AjaxForm
        cannot :create, AjaxForm
        cannot :update, AjaxForm
        can :manage, :admin_ahjax_forms
        cannot :create, :admin_ajax_forms
        cannot :update, :admin_ajax_forms

      end
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
alchemy-ajax-form-1.2.1 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-2.1.0 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-2.0.0 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-1.2.0 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-1.1.5 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-1.1.3 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-1.1.2 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-1.1.1 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-1.1.0 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-1.0.1 app/models/alchemy/ajax_form_ability.rb
alchemy-ajax-form-1.0.0 app/models/alchemy/ajax_form_ability.rb