Commit 9fbbd6a6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Return empty abilities if user is blocked

parent dd19ce96
...@@ -2,6 +2,7 @@ class Ability ...@@ -2,6 +2,7 @@ class Ability
class << self class << self
def allowed(user, subject) def allowed(user, subject)
return [] unless user.kind_of?(User) return [] unless user.kind_of?(User)
return [] if user.blocked?
case subject.class.name case subject.class.name
when "Project" then project_abilities(user, subject) when "Project" then project_abilities(user, subject)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment