I'm doing this in preparation for the "Manager" ability, which will require even more refactors of the abilities (for example, manager can not modify their own account)
12 lines
218 B
Ruby
12 lines
218 B
Ruby
module Abilities
|
|
class Moderator
|
|
include CanCan::Ability
|
|
|
|
def initialize(user)
|
|
self.merge Abilities::Moderation.new(user)
|
|
|
|
can :comment_as_moderator, [Debate, Comment, Proposal]
|
|
end
|
|
end
|
|
end
|