[
https://issues.apache.org/jira/browse/SHIRO-307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13054819#comment-13054819
]
Phil Steitz commented on SHIRO-307:
-----------------------------------
OK, now I get the original intention of the class. The way that I am using it
s really as a bridge between my permissions persistence store and
WildcardPermission. I store <domain, actions, targets> as <String,
Set<String>, Set<String>> and use the setParts code in DomainPermission to
construct WildcardPermissions from these. I guess I could just do the string
encoding myself and work directly with WildcardPermissions, but it is handy to
have the setParts stuff provided.
I now see what you are saying about <String, Set<String>, Set<String>> being
app-specific, but you could argue that it is a natural extension of the default
<String, String, String>. It certainly seemed natural to me :)
Another logical option, I guess, is to use generics in the constructor and make
setParts abstract. But that leaves a class of questionable value.
So I am fine with deprecating. Adding the <String, Set<String>, Set<String>
constructor to WildcardPermission or otherwise Keeping somewhere the setParts
code that acts as a WildcardPermission factory would be useful to me at least.
> 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