Sha256: f3c7432fe4e850568cb7b0f08c6d6d123958cacf55047b027e850a360a7755b4
Contents?: true
Size: 872 Bytes
Versions: 1
Compression:
Stored size: 872 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ae_declarative_authorization-0.7.1 | lib/generators/authorization/rules/templates/authorization_rules.rb |