adjusted user role abilities
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user