I personally wouldn't use enums for roles - unless perhaps you're persisting user
roles as enums. Of course there's no problem doing this, you just need to call
Identity.addRole(myEnum.toString()) in your authenticator method. I could modify the
addRole() method to accept an Object instead of a String, the only difference being that
it would call toString() on whatever object you pass in.
In the other areas of the security API, I can't really see any advantage doing this
though, especially since the security expressions only work with string values anyway.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4012716#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...