diff options
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r-- | app/models/ability.rb | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index fe171cd1a8b..b57ada715df 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -61,14 +61,7 @@ class Ability private def uncached_allowed(user, subject) - policy_class = BasePolicy.class_for(subject) rescue nil - return policy_class.abilities(user, subject) if policy_class - - return anonymous_abilities(subject) if user.nil? - return [] unless user.is_a?(User) - return [] if user.blocked? - - abilities_by_subject_class(user: user, subject: subject) + BasePolicy.class_for(subject).abilities(user, subject) end def abilities_by_subject_class(user:, subject:) |