Sha256: ddb6ee31e64c79e66971d2b769af9e75e776075afb02fd420ad2def81a245b67

Contents?: true

Size: 658 Bytes

Versions: 5

Compression:

Stored size: 658 Bytes

Contents

authorization do
  role :guest do
  end

  role :<%= user_singular_name %> do
    includes :guest
    has_permission_on :<%= user_plural_name %>, :to => :show
    has_permission_on :<%= user_plural_name %>, :to => :update do
      if_attribute :id => is { <%= user_singular_name %>.id }
    end
  end

  role :admin do
    has_permission_on :users, :to => [:manage, :mass_new, :mass_create]
  end
end

privileges do
  privilege :manage, :includes => [:create, :read, :update, :delete]
  privilege :read, :includes => [:index, :show]
  privilege :create, :includes => :new
  privilege :update, :includes => :edit
  privilege :delete, :includes => :destroy
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mondo-generators-0.6.3 rails_generators/mondo_authentication/templates/authorization_rules.rb
mondo-generators-0.6.2 rails_generators/mondo_authentication/templates/authorization_rules.rb
mondo-generators-0.6.1 rails_generators/mondo_authentication/templates/authorization_rules.rb
mondo-generators-0.6.0 rails_generators/mondo_authentication/templates/authorization_rules.rb
mondo-generators-0.5.0 rails_generators/mondo_authentication/templates/authorization_rules.rb