shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philippe Laflamme (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SHIRO-322) Overriding permissionResolver has no effect on implicit iniRealm
Date Mon, 22 Aug 2011 19:06:29 GMT
Overriding permissionResolver has no effect on implicit iniRealm
----------------------------------------------------------------

                 Key: SHIRO-322
                 URL: https://issues.apache.org/jira/browse/SHIRO-322
             Project: Shiro
          Issue Type: Bug
    Affects Versions: 1.1.0
            Reporter: Philippe Laflamme


Currently, the implicit iniRealm processes its role and permissions strings to early. Overriding
the permissionResolver and or rolePermissionResolver has no effect.

The realm is constructed by calling 
new IniRealm(ini)  (IniSecurityManagerFactory.java:254)

This constructor then calls
processDefinition(ini) right away (IniRealm.java:60)

This fills in the roles and users maps in SimpleAccountRealm, but it will use the default
permissionResolver to do so because getPermissionResolver() (TextConfigurationRealm.java:144)
will return the default instance.

IniRealm should probably not do any initialisation code (processDefinition) before init is
called. It overrides onInit() but tests whether the roles and users collections are empty
before doing any processing (and it will only initialise if it was constructed with a resourcePath)...


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message