Add statistics route, permissions, and sidebar entry
- /statistics route and PagePaths.statistics - Permission sets: viewer and admin can access /statistics - Sidebar link with can_access_page check - Plug and sidebar tests updated
This commit is contained in:
parent
fd10fe5cf6
commit
919a8e4ebd
7 changed files with 61 additions and 6 deletions
|
|
@ -88,6 +88,14 @@ defmodule MvWeb.Layouts.Sidebar do
|
|||
/>
|
||||
<% end %>
|
||||
|
||||
<%= if can_access_page?(@current_user, PagePaths.statistics()) do %>
|
||||
<.menu_item
|
||||
href={~p"/statistics"}
|
||||
icon="hero-chart-bar"
|
||||
label={gettext("Statistics")}
|
||||
/>
|
||||
<% end %>
|
||||
|
||||
<%= if admin_menu_visible?(@current_user) do %>
|
||||
<.menu_group
|
||||
icon="hero-cog-6-tooth"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue