adjusted user role abilities

This commit is contained in:
2013-01-28 01:50:13 -05:00
parent e5e579daae
commit bce916412f

View File

@@ -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