Commit 9fbbd6a68ec603de8fd32681d90f47aa98cbd289

Authored by Dmitriy Zaporozhets
1 parent dd19ce96

Return empty abilities if user is blocked

Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
app/models/ability.rb
... ... @@ -2,6 +2,7 @@ class Ability
2 2 class << self
3 3 def allowed(user, subject)
4 4 return [] unless user.kind_of?(User)
  5 + return [] if user.blocked?
5 6  
6 7 case subject.class.name
7 8 when "Project" then project_abilities(user, subject)
... ...