You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shiro.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2011/06/23 06:09:47 UTC

[jira] [Updated] (SHIRO-307) DomainPermission does not fully support domain, actions and targets properties

     [ https://issues.apache.org/jira/browse/SHIRO-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Phil Steitz updated SHIRO-307:
------------------------------

    Attachment: DomainPermission.patch

Here is a patch showing one way (possibly wrong) to think about how to use this class.  It includes a lot of incompatible changes - most significantly changing the actions and targets properties to be Sets.   After playing a bit with trying to define the right abstract methods and then a useable subclass, I came to the conclusion that it might be more convenient to just make this a concrete class with a constructor and accessors (which it sort of already had).  I could be missing the point here.  I added a couple of utility methods needed for splitting / joining strings to/from sets mostly stolen from Commons Lang.  I did not see Lang in the pom.  If I missed it, it would be better to just use Lang.  I have not tested or gotten this to work with my Realm yet.  If it is on the right track, I will improve and add tests.

> DomainPermission does not fully support domain, actions and targets properties
> ------------------------------------------------------------------------------
>
>                 Key: SHIRO-307
>                 URL: https://issues.apache.org/jira/browse/SHIRO-307
>             Project: Shiro
>          Issue Type: Bug
>          Components: Authorization (access control) 
>    Affects Versions: 1.0.0, 1.1.0
>            Reporter: Phil Steitz
>            Assignee: Les Hazlewood
>         Attachments: DomainPermission.patch
>
>
> Per the class javadoc, DomainPermission is designed to be a base class for Permission implementations that persist permission parts as separate properties.  It defines private fields for domain, actions and targets and exposes getters/setters for these, but the setParts and constructor methods that set Permission state do not call the property setters and the property setters don't call setParts.   Property synchronization needs to be added to this class.

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