if (checkNodeOnly)
{
// check node constraints if available; otherwise,
// recursively check parent constraints until
// default constraints for node are checked
SecurityConstraintsImpl constraintsImpl = (SecurityConstraintsImpl)getSecurityConstraints();
if ((constraintsImpl != null) && !constraintsImpl.isEmpty())
{
constraintsImpl.checkConstraints(actions, userPrincipals, rolePrincipals, groupPrincipals, getEffectivePageSecurity());
}
else
{
NodeImpl parentNodeImpl = (NodeImpl)ProxyHelper.getRealObject(parent);
if (parentNodeImpl != null)
{
parentNodeImpl.checkConstraints(actions, userPrincipals, rolePrincipals, groupPrincipals, checkNodeOnly, false);
}
}
}
else
{
// check node constraints if available and not
// to be skipped due to explicity granted access
if (!checkParentsOnly)
{
SecurityConstraintsImpl constraintsImpl = (SecurityConstraintsImpl)getSecurityConstraints();
if ((constraintsImpl != null) && !constraintsImpl.isEmpty())
{
constraintsImpl.checkConstraints(actions, userPrincipals, rolePrincipals, groupPrincipals, getEffectivePageSecurity());
}
}
// recursively check all parent constraints in hierarchy
NodeImpl parentNodeImpl = (NodeImpl)ProxyHelper.getRealObject(parent);