我試圖確定登錄的用戶是否是特定Stormpath組的成員。使用Thymeleaf檢查特定的Stormpath組成員身份
下面的作品,但它是基於錯誤的屬性(groups.href)
<div th:text="${#lists.contains(account.groups.href, 'https://api.stormpath.com/v1/accounts/eXaMpLe12345/groups')}" />
,而我試圖找到(僞代碼)groups.isMemberOf('https://api.stormpath.com/v1/accounts/mYgRrOuP1234/groups')
我知道如何通過組迭代並打印出他們所有的數據,我可以看到我試圖找到的組的href,但我不知道如何通過它的href來訪問它。
<div th:if="${account.groups != null}">
<ul>
<li th:each="group : ${account.groups}" th:text="${group.href}">group details...</li>
</ul>
</div>