[seam-dev] lost functionality in rule-based permission checks
Dan Allen
dan.j.allen at gmail.com
Tue Nov 11 00:44:47 EST 2008
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
--
Dan Allen
Software consultant | Author of Seam in Action
http://mojavelinux.com
http://mojavelinux.com/seaminaction
NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters. Please don't hesitate to resend a message if
you feel that it did not reach my attention.
More information about the seam-dev
mailing list