<%= render Components::PublicActivity::Snippet.new(activity) do %>
  <%
    app_name = activity.trackable&.application&.name || "(deleted app #{activity.trackable&.application_id})"
    app_link = if defined?(current_user) && current_user.is_a?(Backend::User) && activity.trackable&.application
      link_to app_name, backend_program_path(activity.trackable.application)
    else
      app_name
    end
  %>
  <% if defined?(current_identity) && activity.trackable&.resource_owner == current_identity %>
    revoked access for <%= app_link %>.
  <% else %>
    revoked <%= render activity.trackable&.resource_owner, capitalize: false if activity.trackable&.resource_owner %>'s access for <%= app_link %>.
  <% end %>
<% end %>
