Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to mention not of hasRole('ROLE_ADMIN') in spring security taglib

Tags:

How would I write following condition using spring security taglib?

<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>  <sec:authorize access="not of hasRole('ROLE_ADMIN')">    <div> show these for only non admins </div> </sec:authorize> 
like image 386
Dileepa Avatar asked Oct 11 '13 05:10

Dileepa


1 Answers

<sec:authorize access="!hasRole('ROLE_ADMIN')">    <div> show these for only non admins </div> </sec:authorize> 
like image 131
Frederic Close Avatar answered Oct 03 '22 02:10

Frederic Close