Skip to content

Commit d48f99f

Browse files
committed
fix: only show token to repo admins
1 parent 27ec3e7 commit d48f99f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/librecov_web/live/repository_live/show.html.heex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
</div>
1919
<div class="flex-shrink-0 mt-3 mt-sm-0 ms-sm-3">
2020
<span class="d-inline-block btn-group">
21+
<%= if @repository.permissions.admin == true do %>
2122
<div class="btn-group">
2223
<button class="btn btn-primary px-4 py-2 dropdown-toggle" type="button" id="dropdownMenuClickable" data-bs-toggle="dropdown" data-bs-auto-close="false" aria-expanded="false">
2324
<i class="fas fa-key me-1 opacity-50"></i> Show Token
@@ -27,6 +28,7 @@
2728
<li><pre><code><span class="dropdown-item"><%= @project.token %></span></code></pre></li>
2829
</ul>
2930
</div>
31+
<% end %>
3032
<div class="btn-group">
3133
<button class="btn btn-primary px-4 py-2 dropdown-toggle" type="button" id="dropdownMenuClickable2" data-bs-toggle="dropdown" data-bs-auto-close="false" aria-expanded="false">
3234
<i class="far fa-image me-1 opacity-50"></i> Get Badge

0 commit comments

Comments
 (0)