David Jencks wrote:
On Dec 30, 2005, at 4:34 PM, David Sean Taylor wrote:
David Jencks wrote:
I have some doubt this code in PortletPermission is correct:
public boolean implies(Permission permission)
{
// The permission must be an instance
// of the PortletPermission.
if (!(permission instanceof PortletPermission))
{
return false;
}
String name = getName();
if (name != null)
{
int index = name.indexOf('*');
if (index > -1)
{
boolean test = permission.getName().startsWith
(name.substring(0, index));
//I THINK THIS IS WRONG!
Its looking for permissions like "PortletApplicationName::*"
so that you can create portlet permissions for an entire portlet
application as well as by specific name
Yes, obviously the idea is to create a permission with a wildcard for
the portlet, but I would like confirmation that any such permission
must ignore whether a Subject is available and must ignore the content
of the mask. I would have expected that a PortletPermission
implication depended on whether the name matches in some way AND a
subject is available AND the masks align. The current code only looks
at the subject and masks if it is an explicit portlet match, not with a *.
No it should NOT ignore the subject.
Thanks for that
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]