Skip to content

Latest commit

 

History

History
12 lines (5 loc) · 481 Bytes

Solution16.md

File metadata and controls

12 lines (5 loc) · 481 Bytes

Problem 16: How to show/hide information in the frontend depending on the user Role

NOTE: JhipsterPress is changing its name to Springular, so be aware of it! I apologize for the inconvinience

You can do that using the *jhiHasAnyAuthority like in these examples:

<div *jhiHasAnyAuthority="'ROLE_ADMIN'">This should appear.... when ADMIN is logged </div>

<div *jhiHasAnyAuthority="['ROLE_ADMIN', 'ROLE_USER']">This should appear.... when ADMIN or USER is logged </div>