add account access

This commit is contained in:
Pete Matsyburka
2025-05-18 12:13:23 +03:00
parent 82f3ff4824
commit 01232aed5a
8 changed files with 64 additions and 5 deletions
+1 -1
View File
@@ -56,7 +56,7 @@
<% if @templates.present? %>
<div class="grid gap-4 md:grid-cols-3">
<%= render partial: 'templates/template', collection: @templates %>
<% if show_dropzone && current_user.created_at > 2.weeks.ago || params[:tour] == 'true' %>
<% if show_dropzone && (current_user.created_at > 2.weeks.ago || params[:tour] == 'true') && current_user == true_user %>
<% user_config = current_user.user_configs.find_or_initialize_by(key: UserConfig::SHOW_APP_TOUR) %>
<% if user_config.new_record? || user_config.value || params[:tour] == 'true' %>
<div class="hidden md:block">
+2 -2
View File
@@ -55,8 +55,8 @@
<%= user.email %>
</td>
<td>
<span class="badge badge-info badge-outline">
<%= user.role %>
<span class="badge badge-info badge-outline whitespace-nowrap">
<%= t(user.role) %>
</span>
</td>
<td>