spring security for keycloak roles
This commit is contained in:
@ -41,18 +41,6 @@
|
||||
th:text="${sum.getBillingTime(null)}" class="distfat"></span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- for debugging only, set display to block -->
|
||||
<div class="card" style="display: none">
|
||||
<div class="card-body">
|
||||
<span th:text="${#authentication.principal.attributes['resource_access']['timetrack']['roles']}"></span><br />
|
||||
<span th:if="${#authentication.principal.attributes['resource_access']['timetrack']['roles'].contains('timetrack_user')}">role timetrack_user found directly</span><br />
|
||||
<span sec:authorize="hasRole('timetrack_user')" style="color: green">well done</span>
|
||||
<span sec:authorize="!hasRole('timetrack_user')" style="color: rgb(165, 29, 45)">role timetrack_user not yet detected</span>
|
||||
<br />
|
||||
<span>found roles:</span><br />
|
||||
<span th:each="r : ${#authentication.principal.attributes['resource_access']['timetrack']['roles']}" th:if="${r}" th:text="${r + ' '}" style="color: royalblue"></span>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
|
Reference in New Issue
Block a user