Thymeleaf View Function: hasRole

When we develop APPS we need to check which ROLE a user is in to show or hide correct buttons views and so on.

Can you add this feature to the backlog ? This feature will save us a lot of coding.

Sorry about the late response on this one.

It’s possible to pass Javascript functions inside the model that can be called by Thymeleaf. This should help you with this.

Here’s some examples of calling javascript from the view:

1 Like