only level 2 users can create spending proposals
This commit is contained in:
@@ -22,7 +22,6 @@ module Abilities
|
||||
can :create, Comment
|
||||
can :create, Debate
|
||||
can :create, Proposal
|
||||
can :create, SpendingProposal
|
||||
|
||||
can [:flag, :unflag], Comment
|
||||
cannot [:flag, :unflag], Comment, user_id: user.id
|
||||
@@ -41,6 +40,7 @@ module Abilities
|
||||
if user.level_two_or_three_verified?
|
||||
can :vote, Proposal
|
||||
can :vote_featured, Proposal
|
||||
can :create, SpendingProposal
|
||||
end
|
||||
|
||||
can :create, Annotation
|
||||
|
||||
@@ -6,8 +6,11 @@
|
||||
|
||||
<p><%= t('spending_proposals.index.text') %></p>
|
||||
|
||||
<%= link_to t('spending_proposals.index.create_link'), new_spending_proposal_path, class: 'button radius' %>
|
||||
|
||||
<% if can? :create, SpendingProposal %>
|
||||
<%= link_to t('spending_proposals.index.create_link'), new_spending_proposal_path, class: 'button radius' %>
|
||||
<% else %>
|
||||
<p><%= t('spending_proposals.index.verified_only', verify_account: link_to(t('spending_proposals.index.verify_account'), verification_path)).html_safe %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user