Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions app/views/users/_oauth_authorization.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span class="bold flex items-center">
<span><%= authorization.application.name %></span> <span class="badge bg-info ml1">App</span>
</span>
<%= link_to revoke_oauth_application_users_path(authorization.application.id), method: :delete, class: "muted tooltipped tooltipped--w z5", 'aria-label': "Sign out of this app" do %>
<%= link_to revoke_oauth_application_users_path(authorization.application.id), method: :delete, class: "muted tooltipped tooltipped--w z5", 'aria-label': "Sign out of this app", disabled: do %>
<%= inline_icon "door-leave", size: home_action_size %>
<% end %>
</span>
Expand Down Expand Up @@ -37,7 +37,8 @@
<td>
<% if token.expires_in %>
<%= link_to make_authorization_eternal_users_path(id: token.id), method: :post,
class: "btn bg-success py1 px2 h4" do %>
class: "btn bg-success py1 px2 h4",
disabled: !policy(token).make_eternal? do %>
<%= inline_icon "clock", size: home_action_size %>
Make eternal
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/users/edit_security.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
<% if session.is_a? UserSession %>
<%= render "user_session", session: %>
<% elsif session.respond_to? :authorization_count %>
<%= render "oauth_authorization", authorization: session %>
<%= render "oauth_authorization", authorization: session, disabled: %>
<% end %>
<% end %>
</div>
Expand All @@ -181,7 +181,7 @@
<% if session.is_a? UserSession %>
<%= render "user_session", session: %>
<% elsif session.respond_to? :authorization_count %>
<%= render "oauth_authorization", authorization: session %>
<%= render "oauth_authorization", authorization: session, disabled: %>
<% end %>
<% end %>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
<span class="secondary">No name</span>
<% end %>
</span>
<%= link_to user_webauthn_credential_path(webauthn_credential.user, webauthn_credential), method: :delete, class: "muted tooltipped tooltipped--w z5", 'aria-label': "Delete this security key" do %>
<%= link_to user_webauthn_credential_path(webauthn_credential.user, webauthn_credential),
method: :delete,
class: "muted tooltipped tooltipped--w z5",
'aria-label': "Delete this security key",
disabled: !policy(webauthn_credential).destroy? do %>

<%= inline_icon "delete", size: home_action_size %>
<% end %>
</span>
Expand Down