Legislation question comments spec
This commit is contained in:
@@ -2,4 +2,8 @@ module LegislationHelper
|
||||
def format_date(date)
|
||||
l(date, format: "%d %b %Y") if date
|
||||
end
|
||||
|
||||
def legislation_question_path(question)
|
||||
legislation_process_question_path(question.process, question)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ module Abilities
|
||||
can :mark_featured, Debate
|
||||
can :unmark_featured, Debate
|
||||
|
||||
can :comment_as_administrator, [Debate, Comment, Proposal]
|
||||
can :comment_as_administrator, [Debate, Comment, Proposal, Legislation::Question]
|
||||
|
||||
can [:search, :create, :index, :destroy], ::Moderator
|
||||
can [:search, :create, :index, :summary], ::Valuator
|
||||
@@ -49,6 +49,7 @@ module Abilities
|
||||
can [:manage], ::Legislation::Process
|
||||
can [:manage], ::Legislation::DraftVersion
|
||||
can [:manage], ::Legislation::Question
|
||||
cannot :comment_as_moderator, ::Legislation::Question
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@ module Abilities
|
||||
def initialize(user)
|
||||
self.merge Abilities::Moderation.new(user)
|
||||
|
||||
can :comment_as_moderator, [Debate, Comment, Proposal]
|
||||
can :comment_as_moderator, [Debate, Comment, Proposal, Legislation::Question]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user