We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90f9339 commit ce5a1c8Copy full SHA for ce5a1c8
1 file changed
app/views/devise/registrations/edit.html.erb
@@ -59,6 +59,15 @@
59
<%= f.submit "Update", class: 'button is-filled is-very-large', disabled: sso %>
60
<% end %><br/>
61
62
-<%= link_to delete_account_path, class: 'button is-outlined is-danger' do %>
63
- Delete my account »
+<% if current_user.at_least_moderator? %>
+ <%= link_to 'javascript:void(0)', class: 'button is-outlined is-danger', disabled: true do %>
64
+ Delete my account »
65
+ <% end %>
66
+ <p class="has-color-red has-font-size-caption">
67
+ Moderators and admins cannot be self-deleted. Contact support if you wish to delete your account.
68
+ </p>
69
+<% else %>
70
+ <%= link_to delete_account_path, class: 'button is-outlined is-danger' do %>
71
72
73
<% end %>
0 commit comments