<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -18,6 +18,22 @@ end
 Above example gives access to users with admin role and to the owner of the
 @photo object which is to be updated.
 
+There can also be passed array of owners as owner method argument:
+
+class UsersController &lt; ApplicationController
+  before_filter :login_required, :only =&gt; [:update_photo]
+  before_filter :find_photo   # sets @photo
+  owner '@users'
+  access_control :update_photo =&gt; '(admin | owner)'
+  
+  protected
+  
+  def find_photo
+    @photo = Photo.find(params[:id])
+    @users = [@photo.owner_1, @photo.owner_2]
+  end
+end
+
 
 page_owner
 ----------
@@ -46,6 +62,7 @@ owner '@album.user', {}, :new =&gt; '@user', :index =&gt; '@another_user', :create =&gt;
 Some actions don't have any owner, and then we can just set owners of such actions
 to be nil.
 
+
 TESTS
 Tests won't work if acl plugin is in another directory than ../acl_system2
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -11,7 +11,14 @@ module Ocher
       def check(key, context)
         if key.downcase == 'owner'
           logged_user context[:user] do
-            (context[:user].id == context[:owner].id)
+            unless context[:owner].is_a?(Array)
+              (context[:user].id == context[:owner].id)
+            else
+              context[:owner].each do |owner|
+                return true if owner.id == context[:user].id
+              end
+              false
+            end
           end
         elsif key.downcase == 'page_owner'
           logged_user context[:user] do</diff>
      <filename>lib/acl_system2_ownership.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,13 +14,9 @@ class AbstractUser
   attr_accessor :id
   attr_accessor :name
 
-  def initialize(name = 'name')
+  def initialize(name = 'name', id = 1)
     @name = name
-  end
-
-  def id
-    @id ||= 1
-    @id
+    @id = id
   end
 end
 
@@ -147,4 +143,16 @@ class AclSystem2OwnershipTest &lt; Test::Unit::TestCase
     assert_equal controller.permit?(&quot;page_owner&quot;, context), false
     assert_equal controller.permit?(&quot;user | page_owner&quot;, context), true
   end
+  
+  def test_array_of_owners
+    owner1, owner2 = User.new('owner1', 1), User.new('owner1', 2)
+    context_owner1 = { :user =&gt; User.new('owner1', 1) }              # logged in user, id = 1
+    context_owner2 = { :user =&gt; User.new('owner2', 2) }              # logged in user, id = 2
+    context_not_owner = { :user =&gt; User.new('owner2', 1000) }        # logged in user, id = 1000
+    controller = ControllerProxy.new([owner1, owner2])               # user 1 is owner of object (the same id)
+    
+    assert_equal true, controller.permit?(&quot;owner&quot;, context_owner1)
+    assert_equal true, controller.permit?(&quot;owner&quot;, context_owner2)    
+    assert_equal false, controller.permit?(&quot;owner&quot;, context_not_owner)    
+  end
 end</diff>
      <filename>test/acl_system2_ownership_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e176d258771b134d5eb9c74f4f320110a538ba24</id>
    </parent>
  </parents>
  <author>
    <name>Michal Ochman</name>
    <email>ocherek@gmail.com</email>
  </author>
  <url>http://github.com/ocher/acl2_ownership/commit/b0ae8f2ee3ff1cdd8a1131512c8238f74dfc8c5c</url>
  <id>b0ae8f2ee3ff1cdd8a1131512c8238f74dfc8c5c</id>
  <committed-date>2008-09-13T13:03:35-07:00</committed-date>
  <authored-date>2008-09-13T13:03:35-07:00</authored-date>
  <message>Added support for setting array of owners</message>
  <tree>9232c9a81f176584c79994c3aff390c917603bd1</tree>
  <committer>
    <name>Michal Ochman</name>
    <email>ocherek@gmail.com</email>
  </committer>
</commit>
