Skip to content

Commit

Permalink
show user edit button only if user can govern target
Browse files Browse the repository at this point in the history
  • Loading branch information
burdoto committed Dec 20, 2023
1 parent f1df5d4 commit 6a88ea4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hub/main/resources/templates/user/view.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="ui-content">
<form action="/api/webapp/user/edit" method="post">
<h2>User <b th:text="${target.getBestName()}"></b>
- <a class="ui-button" th:if="${canManageUsers}" th:href="@{'/user/edit/'+${id}}">Edit</a>
<div th:if="${user.canGovern(target)}"> - <a class="ui-button" th:href="@{'/user/edit/'+${id}}">Edit</a></div>
<table>
<tbody>
<tr><td>Name</td><td><input name="name" th:readonly="${!edit}" th:value="${target.name}" type="text"></td></tr>
Expand Down

0 comments on commit 6a88ea4

Please sign in to comment.