From bce916412f159c184cf1b4b2fd5f5fa52bb6689f Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Mon, 28 Jan 2013 01:50:13 -0500 Subject: [PATCH] adjusted user role abilities --- app/models/ability.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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