Skip to content

Commit

Permalink
Fix owned clients details
Browse files Browse the repository at this point in the history
  • Loading branch information
Portals committed Jun 9, 2024
1 parent 2ebc365 commit d692d71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public ModelAndView createUserClient(
mv.addObject("userApprovals", new ArrayList<>());
mv.addObject("clientSecret", result.clientSecret());
mv.addObject("apiKeyToken", result.apiKeyToken());
mv.addObject("amIOwner", true);

response.addHeader("HX-Push-Url", "/clients/" + result.client().clientUid().toString());

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/resources/templates/pages/client-details.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<header th:replace="~{common/header}"></header>
<div id="alerts"></div>
<main th:attr="data-hx-headers=${amIOwner} ? '{\'owner\': \'true\'}' : null">
<main th:data-hx-headers="${amIOwner} ? '{&quot;owner&quot;: &quot;true&quot;}' : null">
<th:block th:if="${clientSecret != null}">
<article th:replace="~{partial/client-credentials}"></article>
</th:block>
Expand Down

0 comments on commit d692d71

Please sign in to comment.