Skip to content

Commit

Permalink
example authorization rules
Browse files Browse the repository at this point in the history
  • Loading branch information
stffn committed Aug 18, 2008
1 parent 0ba2478 commit ca8c96b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 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

0 comments on commit ca8c96b

Please sign in to comment.