/** * Returns true if the specified path may only be accesses by an authorized user. * @param url the application-relative path of the URL */ boolean requiresAuthorization( URL url ) { String result; String file = url.getFile(); if (_contextPath.equals( "" )) { result = file; } else if (file.startsWith( _contextPath )) { result = file.substring( _contextPath.length() ); } else { result = null; } return getControllingConstraint( result ) != NULL_SECURITY_CONSTRAINT; }
/** * Returns true if the specified path may only be accesses by an authorized user. * @param url the application-relative path of the URL */ boolean requiresAuthorization( URL url ) { String result; String file = url.getFile(); if (_contextPath.equals( "" )) { result = file; } else if (file.startsWith( _contextPath )) { result = file.substring( _contextPath.length() ); } else { result = null; } return getControllingConstraint( result ) != NULL_SECURITY_CONSTRAINT; }
/** * Returns true if the specified path may only be accesses by an authorized user. * @param url the application-relative path of the URL */ boolean requiresAuthorization( URL url ) { String result; String file = url.getFile(); if (_contextPath.equals( "" )) { result = file; } else if (file.startsWith( _contextPath )) { result = file.substring( _contextPath.length() ); } else { result = null; } return getControllingConstraint( result ) != NULL_SECURITY_CONSTRAINT; }
/** * Returns an array containing the roles permitted to access the specified URL. */ String[] getPermittedRoles( URL url ) { String result; String file = url.getFile(); if (_contextPath.equals( "" )) { result = file; } else if (file.startsWith( _contextPath )) { result = file.substring( _contextPath.length() ); } else { result = null; } return getControllingConstraint( result ).getPermittedRoles(); }
/** * Returns an array containing the roles permitted to access the specified URL. */ String[] getPermittedRoles( URL url ) { String result; String file = url.getFile(); if (_contextPath.equals( "" )) { result = file; } else if (file.startsWith( _contextPath )) { result = file.substring( _contextPath.length() ); } else { result = null; } return getControllingConstraint( result ).getPermittedRoles(); }
/** * Returns an array containing the roles permitted to access the specified URL. */ String[] getPermittedRoles( URL url ) { String result; String file = url.getFile(); if (_contextPath.equals( "" )) { result = file; } else if (file.startsWith( _contextPath )) { result = file.substring( _contextPath.length() ); } else { result = null; } return getControllingConstraint( result ).getPermittedRoles(); }