Announcement Announcement Module
Collapse
No announcement yet.
using hasPermission with sec:authorize in jsp Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • using hasPermission with sec:authorize in jsp

    Hi,

    I am using a custom PermissionEvaluator and i want to use the tag sec:authorize with hasPermission in my jsp / views. So i tried to use the following syntax:

    <sec:authorize access="hasPermission(#user, 'cadastra_usuario')">
    <button type="button" class="btn btn-sm btn-link link" data-action="${cadastro}">
    cadastrar novo usu&aacute;rio
    </button>
    </sec:authorize>

    But when i call this view i get the following error:

    Jun 04, 2014 7:34:20 PM org.springframework.security.access.expression.Den yAllPermissionEvaluator hasPermission
    AdvertÃÂȘncia: Denying user klebermo permission 'cadastra_usuario' on object null

    what is this object with the null value? Is there some interface I need implement or some class I need extend? My configuration right now it's that:

    https://github.com/klebermo/lojavirt...onfig/security

    Anyone can see what I missing here? This kind of new to me, and I am a bit lost.
    Last edited by klebermo; Jun 4th, 2014, 05:43 PM.
Working...
X