Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

example authorization rules

  • Loading branch information...
commit ca8c96bc97dd9d9f6e8de913601c2cf0d2bb4eaf 1 parent 0ba2478
@stffn authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 authorization_rules.dist.rb
View
20 authorization_rules.dist.rb
@@ -0,0 +1,20 @@
+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
+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
Please sign in to comment.
Something went wrong with that request. Please try again.