java - Shiro persist permission - what to save in the DB? -


i have created 3 roles application: admin, user, guest. each of these 3 roles have set of permissions. want persist these roles permissions database. how persist permissions?

role r = new role("admin"); permission p1 = new wildcardpermission("account:create"); permission p2 = new wildcardpermission("file:delete"); r.addpermission(p1); r.addpermission(p2); //etc 

do save database following strings "account:create" , "file:delete" , instantialize permission them when query object? if case, why there no way original string permission object? if call p1.tostring(), returns "[account]:[create]" considered different permission "account:create".


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -