Add display name and PGP key to admin user page
Link the key to the ASCII Armor WKD endpoint, if it contains the user's account address
This commit is contained in:
parent
4a677178e8
commit
c3f1f97e1a
@ -89,13 +89,47 @@
|
||||
</section>
|
||||
|
||||
<section class="sm:flex-1 sm:pt-0">
|
||||
<% if @avatar.present? %>
|
||||
<h3>LDAP<h3>
|
||||
<p>
|
||||
<img src="data:image/jpeg;base64,<%= @avatar %>" class="h-48 w-48" />
|
||||
</p>
|
||||
<% end %>
|
||||
<!-- <h3>Actions</h3> -->
|
||||
<h3>LDAP</h3>
|
||||
<table class="divided">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Avatar</th>
|
||||
<td>
|
||||
<% if @avatar.present? %>
|
||||
<img src="data:image/jpeg;base64,<%= @avatar %>" class="h-48 w-48" />
|
||||
<% else %>
|
||||
—
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Display name</th>
|
||||
<td><%= @user.display_name || "—" %></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="align-top">PGP key</th>
|
||||
<td class="align-top leading-5">
|
||||
<% if @user.pgp_pubkey.present? %>
|
||||
<span class="font-mono" title="<%= @user.pgp_fpr %>">
|
||||
<% if @user.pgp_pubkey_contains_user_address? %>
|
||||
<%= link_to wkd_key_url(hashed_username: @user.wkd_hash, l: @user.cn, format: :txt),
|
||||
class: "ks-text-link", target: "_blank" do %>
|
||||
<%= "#{@user.pgp_fpr[0, 8]}…#{@user.pgp_fpr[-8..-1]}" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= "#{@user.pgp_fpr[0, 8]}…#{@user.pgp_fpr[-8..-1]}" %>
|
||||
<% end %>
|
||||
</span><br />
|
||||
<% @user.gnupg_key.uids.each do |uid| %>
|
||||
<%= uid.uid %><br />
|
||||
<% end %>
|
||||
<% else %>
|
||||
—
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user