Enable moderation abilities for Budget::Investment model
This commit is contained in:
@@ -17,6 +17,9 @@ module Abilities
|
||||
can :restore, Legislation::Proposal
|
||||
cannot :restore, Legislation::Proposal, hidden_at: nil
|
||||
|
||||
can :restore, Budget::Investment
|
||||
cannot :restore, Budget::Investment, hidden_at: nil
|
||||
|
||||
can :restore, User
|
||||
cannot :restore, User, hidden_at: nil
|
||||
|
||||
@@ -32,6 +35,9 @@ module Abilities
|
||||
can :confirm_hide, Legislation::Proposal
|
||||
cannot :confirm_hide, Legislation::Proposal, hidden_at: nil
|
||||
|
||||
can :confirm_hide, Budget::Investment
|
||||
cannot :confirm_hide, Budget::Investment, hidden_at: nil
|
||||
|
||||
can :confirm_hide, User
|
||||
cannot :confirm_hide, User, hidden_at: nil
|
||||
|
||||
|
||||
@@ -46,6 +46,9 @@ module Abilities
|
||||
can [:flag, :unflag], Legislation::Proposal
|
||||
cannot [:flag, :unflag], Legislation::Proposal, author_id: user.id
|
||||
|
||||
can [:flag, :unflag], Budget::Investment
|
||||
cannot [:flag, :unflag], Budget::Investment, author_id: user.id
|
||||
|
||||
can [:create, :destroy], Follow
|
||||
|
||||
can [:destroy], Document, documentable: { author_id: user.id }
|
||||
|
||||
@@ -63,6 +63,15 @@ module Abilities
|
||||
cannot :moderate, ProposalNotification, author_id: user.id
|
||||
|
||||
can :index, ProposalNotification
|
||||
|
||||
can :hide, Budget::Investment, hidden_at: nil
|
||||
cannot :hide, Budget::Investment, author_id: user.id
|
||||
|
||||
can :ignore_flag, Budget::Investment, ignored_flag_at: nil, hidden_at: nil
|
||||
cannot :ignore_flag, Budget::Investment, author_id: user.id
|
||||
|
||||
can :moderate, Budget::Investment
|
||||
cannot :moderate, Budget::Investment, author_id: user.id
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user