- <%= button_to account_join_code_path, method: :delete, class: "btn btn--circle txt-small", data: {
- turbo_confirm: "Are you sure you want to generate a new link? The previous code will stop working." } do %>
- <%= icon_tag "refresh" %>
- Generate a new code
+
+ <% if Current.user.can_administer? %>
+ <%= button_to account_join_code_path, method: :delete, class: "btn btn--circle txt-small", data: {
+ turbo_confirm: "Are you sure you want to generate a new link? The previous code will stop working." } do %>
+ <%= icon_tag "refresh" %>
+ Generate a new code
+ <% end %>
<% end %>
@@ -59,8 +62,10 @@
This code has been used <%= @join_code.usage_count %>/<%= @join_code.usage_limit %> times
(<%= @join_code.active? ? @join_code.usage_limit - @join_code.usage_count : "none" %> remaining)
- <%= link_to edit_account_join_code_path, class: @join_code.active? ? "txt-link" : "txt-negative txt-underline" do %>
- Change limit
+ <% if Current.user.can_administer? %>
+ <%= link_to edit_account_join_code_path, class: @join_code.active? ? "txt-link" : "txt-negative txt-underline" do %>
+ Change limit
+ <% end %>
<% end %>
diff --git a/app/views/account/settings/_entropy.html.erb b/app/views/account/settings/_entropy.html.erb
index f6056ab37..034d8128f 100644
--- a/app/views/account/settings/_entropy.html.erb
+++ b/app/views/account/settings/_entropy.html.erb
@@ -4,5 +4,5 @@
Fizzy doesn’t let stale cards stick around forever. Cards automatically close as “Not Now” without activity for specific period of time. This is the default, global setting — you can override it on each board.
<% end %>
@@ -19,10 +24,10 @@
controller: "form boards-form",
boards_form_self_removal_prompt_message_value: "Are you sure you want to remove yourself from this board? You won’t be able to get back in unless someone invites you.",
action: "turbo:submit-start->boards-form#submitWithWarning" } do |form| %>
- <%= render "boards/edit/name", form: form %>
+ <%= render "boards/edit/name", form: form, board: @board %>
<%= render "boards/edit/users", board: @board, selected_users: @selected_users, unselected_users: @unselected_users, form: form %>
-