OSDN Git Service

Merge branch 'v05' of git.sourceforge.jp:/gitroot/pettanr/pettanr into v05client
[pettanr/pettanr.git] / app / models / system_picture.rb
index 631b3c5..50e6ec3 100644 (file)
@@ -21,7 +21,10 @@ class SystemPicture < ActiveRecord::Base
   def overwrite
   end
   
-  def own? ad
+  def own? roles
+    roles = [roles] unless roles.respond_to?(:each)
+    ad = SystemPicture.get_admin_from_roles roles
+    return false unless ad
     true
   end