public boolean resourceControlOk ( HttpServletRequest req , HttpServletResponse res , String reqPath ) { if ( null == reqPath ) reqPath = TdsPathUtils . extractPath ( req , null ) ; // see if its under resource control String rc = null ; DataRootManager . DataRootMatch match = dataRootManager . findDataRootMatch ( reqPath ) ; if ( match != null ) { rc = match . dataRoot . getRestrict ( ) ; // datasetScan, featCollection are restricted at the dataRoot } if ( rc == null ) { rc = datasetTracker . findResourceControl ( reqPath ) ; // regular datasets tracked here } return resourceAuthorized ( req , res , rc ) ; }
Check if this is making a request for a restricted dataset and if so if its allowed .