app/models/pbw/constraint.rb in pbw-0.0.10 vs app/models/pbw/constraint.rb in pbw-0.1.0
- old
+ new
@@ -4,10 +4,10 @@
has_and_belongs_to_many :areas, :class_name => 'Pbw::Area'
def self.viewable_by?(user, subject)
return true if user.admin?
subject.tokens.each do |token|
- return true token.user && token.user == user
+ return true if token.user && token.user == user
end
false
end
def self.creatable_by?(user, subject)