private static void checkPermissionForValidate() {
AccessControlled subject = Stapler.getCurrentRequest().findAncestorObject(AbstractProject.class);
if (subject == null)
Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
else
subject.checkPermission(Item.CONFIGURE);
}
/**
* A convenience method over {@link #validateRelativePath(String, boolean, boolean)}.
*/