pundit: convert user name change requests to pundit.
Fix discrepancy between index action and show action. The index action allowed members to see name changes for undeleted users, but the show action didn't.
This commit is contained in:
@@ -121,7 +121,7 @@
|
||||
<% else %>
|
||||
<li><%= link_to "Profile", profile_path %></li>
|
||||
<li><%= link_to "Settings", settings_path %></li>
|
||||
<% if CurrentUser.is_gold? %>
|
||||
<% if policy(UserNameChangeRequest).create? %>
|
||||
<li><%= link_to "Change name", new_user_name_change_request_path %></li>
|
||||
<% end %>
|
||||
<li><%= link_to "Delete account", maintenance_user_deletion_path %></li>
|
||||
@@ -150,7 +150,7 @@
|
||||
<li><%= link_to("Jobs", delayed_jobs_path) %></li>
|
||||
<li><%= link_to("Bulk Update Requests", bulk_update_requests_path) %></li>
|
||||
|
||||
<% if CurrentUser.is_member? %>
|
||||
<% if policy(UserNameChangeRequest).index? %>
|
||||
<li><%= link_to("User Name Change Requests", user_name_change_requests_path) %></li>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user