Reputation:
I'm using@RolesAllowed
. It seems to only work with a constant value. But does a solution exist to use a non constant role in @RolesAllowed
in Java EE?
Thanks
Upvotes: 2
Views: 265
Reputation: 33946
No, it is not possible to use non-constant names with standard Java EE declarative security. Instead, use @DeclareRoles
with either HttpServletRequest.isUserInRole
or EJBContext.isCallerInRole
.
Upvotes: 1