Sha256: 1ca4ed54764cc47a7461f96980eac1c6013770f6ad297982e297d038b42ba37f

Contents?: true

Size: 845 Bytes

Versions: 25

Compression:

Stored size: 845 Bytes

Contents

authorization do
  role :guest do
    # add permissions for guests here, e.g.
    # has_permission_on :conferences, :to => :read
  end
  
  # permissions on other roles, such as
  # role :admin do
  #   has_permission_on :conferences, :to => :manage
  # end
  # role :user do
  #   has_permission_on :conferences, :to => [:read, :create]
  #   has_permission_on :conferences, :to => [:update, :delete] do
  #     if_attribute :user_id => is {user.id}
  #   end
  # end
  # See the readme or GitHub for more examples
end

privileges do
  # default privilege hierarchies to facilitate RESTful Rails apps
  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

25 entries across 25 versions & 2 rubygems

Version Path
ae_declarative_authorization-1.4.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-1.3.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-1.2.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-1.1.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-1.0.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.13.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.13.0.rc1 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.12.1 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.12.1.tim1 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.12.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.11.0.pre1 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.11.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.10.2 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.10.1 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.10.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.9.2 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.9.1 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.9.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.8.0 lib/generators/authorization/rules/templates/authorization_rules.rb
ae_declarative_authorization-0.7.0 lib/generators/authorization/rules/templates/authorization_rules.rb