[seam-dev] lost functionality in rule-based permission checks

Shane Bryzak shane.bryzak at jboss.com
Tue Nov 11 01:10:03 EST 2008


Unfortunately that would break the PermissionResolver interface, and the 
meaning of what a Permission is has been well defined in Seam 2.1.0 (for 
the better).  Can you give me an example of one of these permission 
checks and the corresponding rule?

Dan Allen wrote:
> Shane,
>
> It appears that when the migration was made to the chain of permission
> resolvers in Seam 2.1, the ability to place arbitrary objects into the
> Drools working memory was lost. Before Seam 2.1, a permission check
> consisted of a name, an action, and an unbounded set of contextual
> objects. In Seam 2.1, only the first optional argument is considered,
> and it's inserted into the working memory in place of the name.
>
> public boolean hasPermission(String name, String action, Object...arg)
> {
>    ...
>    if (arg != null)
>    {
>       return permissionMapper.resolvePermission(arg[0], action);
>    }
>    else
>    {
>       return permissionMapper.resolvePermission(name, action);
>    }
> }
>
> I have quite a number of rules that rely on both the name and the
> extra parameters. I'm sure others do as well. Can we change this logic
> so that the permission mapper preserves the ordering of arguments and
> the RuleBasedPermissionMapper stuffs the optional arguments into the
> working memory?
>
> -Dan
>
>   




More information about the seam-dev mailing list