fix check for owner==current_user
authorTom Clegg <tom@clinicalfuture.com>
Fri, 25 Jan 2013 23:07:24 +0000 (15:07 -0800)
committerTom Clegg <tom@clinicalfuture.com>
Fri, 25 Jan 2013 23:07:24 +0000 (15:07 -0800)
app/models/orvos_model.rb

index 484fbc05c9422ecb887fbed94b5faf3294f687e4..49f24dba3677f2236131d335f8d68522fde71a67 100644 (file)
@@ -32,7 +32,7 @@ class OrvosModel < ActiveRecord::Base
 
   def permission_to_update
     return false unless current_user
-    if self.owner_changed? and self.owner_was != self.uuid
+    if self.owner_changed? and self.owner_was != current_user.uuid
       return Metadatum.where(metadata_class: 'permission',
                              name: 'can_pillage',
                              tail: self.owner,