base/app/models/actor.rb in social_stream-0.25.2 vs base/app/models/actor.rb in social_stream-0.26.0

- old
+ new

@@ -55,10 +55,14 @@ :source => :ties has_many :received_ties, :through => :received_contacts, :source => :ties + + has_many :received_relations, + :through => :received_ties, + :source => :relation has_many :senders, :through => :received_contacts, :uniq => true @@ -309,9 +313,14 @@ def following_actor_ids following_actor_objects. includes(:actor). map(&:actor). map(&:id) + end + + # Does this {Actor} allow subject to perform action on object? + def allow?(subject, action, object) + ties_to(subject).with_permissions(action, object).any? end # The {Channel} of this {Actor} to self (totally close!) def self_channel Channel.find_or_create_by_author_id_and_user_author_id_and_owner_id id, id, id