pundit: convert posts to pundit.

This commit is contained in:
evazion
2020-03-20 01:55:51 -05:00
parent dd39913e55
commit a5418abb31
18 changed files with 178 additions and 95 deletions

View File

@@ -1,4 +1,4 @@
<% if CurrentUser.is_gold? %>
<% if policy(Post).can_use_mode_menu? %>
<section id="mode-box">
<h1>Mode</h1>
<form action="/">

View File

@@ -1,7 +1,7 @@
<section id="options-box">
<h1>Options</h1>
<ul>
<% if CurrentUser.is_member? %>
<% if policy(SavedSearch).create? %>
<li><%= button_tag(tag.i(class: "fas fa-bookmark") + " Save search", id: "save-search", class: "ui-button ui-widget ui-corner-all sub") %></li>
<% end %>
</ul>