XML Access Exception Handling

27288

One of the biggest time costs for any custom code we write for HighQ sites involves checking if a user has access to an iSheet/View combination using the checkUserAccess method, this is because if you attempt to access an XML feed that you don't have access to you get thrown to:

Access restricted


You do not have access to this content. This may be because you don't have permission to this specific piece of content or because you don't have access to the site.

 

The main issue with this is there's no way back for the user to the page, if they don't have access to say 1 of 10 isheets you attempt to access via the XML feed in code then they'll always get thrown to this screen.

Rather than automatically handle the issue like this, if there's a request for:

sheetViewExportXML.action&metaData.siteID=99999&metaData.sheetId=9999&metaData.sheetViewID=999999&metaData.isheetExportType=xml

and I don't have access, return a standard error code rather than a hard redirect.

Parents
  • Ryan McDonough Mark Salamon . Good news, it looks like a hidden gem has crept into 5.5. Export xml now includes &errorWithoutRedirection=false at the end of it (manage views -> select view). On my testing just there now it looks like it is default behaviour and it doesn't actually have to be appended at all. No more redirects happening.

Reply
  • Ryan McDonough Mark Salamon . Good news, it looks like a hidden gem has crept into 5.5. Export xml now includes &errorWithoutRedirection=false at the end of it (manage views -> select view). On my testing just there now it looks like it is default behaviour and it doesn't actually have to be appended at all. No more redirects happening.

Children
No Data