Hide admin settings from non-admin users

This commit is contained in:
Eugene Burmakin 2024-11-12 14:47:41 +01:00
parent 94e60c4974
commit bae84d19d9
4 changed files with 13 additions and 5 deletions

View file

@ -1 +1 @@
0.16.3
0.16.4

View file

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
# 0.16.4 - 2024-11-12
### Added
- Admins can now see all users in the system on the Users page. The path is `/settings/users`.
# 0.16.3 - 2024-11-10
### Fixed

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,7 @@
<div role="tablist" class="tabs tabs-lifted tabs-lg">
<%= link_to 'Main', settings_path, role: 'tab', class: "tab #{active_tab?(settings_path)}" %>
<%= link_to 'Users', settings_users_path, role: 'tab', class: "tab #{active_tab?(settings_users_path)}" %>
<%= link_to 'Background Jobs', settings_background_jobs_path, role: 'tab', class: "tab #{active_tab?(settings_background_jobs_path)}" %>
<% if current_user.admin? %>
<%= link_to 'Users', settings_users_path, role: 'tab', class: "tab #{active_tab?(settings_users_path)}" %>
<%= link_to 'Background Jobs', settings_background_jobs_path, role: 'tab', class: "tab #{active_tab?(settings_background_jobs_path)}" %>
<% end %>
</div>