diff --git a/app/models/ability.rb b/app/models/ability.rb index 368eb17..552c797 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -7,6 +7,7 @@ class Ability can :manage, :all if user.admin? can :manage, Post if user.moderator? + can :manage, Topic if user.moderator? can :read, Category, :state => true can :read, Forum, :state => true, :category => { :state => true } @@ -19,6 +20,8 @@ class Ability can :create, Post, :topic => { :locked => false } unless user.new_record? can :create, Topic unless user.new_record? - cannot :read, :all if user.banned? + cannot :update, :all if user.banned? + cannot :destroy, :all if user.banned? + cannot :create, :all if user.banned? end end