Skip to content
Browse files

Updated decl_auth and made use of new :join_by option

  • Loading branch information...
1 parent 120c8c7 commit d0149836c6db92e874bdb931b8da7c0e7dfab3f3 @stffn committed Apr 2, 2009
Showing with 7 additions and 7 deletions.
  1. +6 −6 config/authorization_rules.rb
  2. +1 −1 vendor/plugins/declarative_authorization
View
12 config/authorization_rules.rb
@@ -13,16 +13,16 @@
role :user do
includes :guest
- has_permission_on :conference_attendees, :to => :create do
- if_attribute :user => is {user},
- :conference => { :published => true }
+ has_permission_on :conference_attendees, :to => :create, :join_by => :and do
+ if_attribute :user => is {user}
+ if_permitted_to :read, :conference
end
has_permission_on :conference_attendees, :to => :delete do
- if_attribute :user => is {user},
- :conference => { :attendees => contains {user} }
+ if_attribute :user => is {user}
end
has_permission_on :talk_attendees, :to => :create do
- if_attribute :talk => { :conference => { :attendees => contains {user} }}
+ if_attribute :talk => { :conference => { :attendees => contains {user} }},
+ :user => is {user}
end
has_permission_on :talk_attendees, :to => :delete do
if_attribute :user => is {user}
2 vendor/plugins/declarative_authorization
@@ -1 +1 @@
-Subproject commit 9ce20b77ae281101368374f4db9b7dce0b469336
+Subproject commit 2162e8755ecdc2e5f0581d84847f68a5bc9d678b

0 comments on commit d014983

Please sign in to comment.
Something went wrong with that request. Please try again.