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
  • A note for anyone looking at this, fetch can ignore these forced redirects, however fetch doesn't have support in IE or the early versions of edge so if you still have users on those (which I imagine every law firm does) then it won't work - even the polyfilled versions of fetch can't do it.

Reply
  • A note for anyone looking at this, fetch can ignore these forced redirects, however fetch doesn't have support in IE or the early versions of edge so if you still have users on those (which I imagine every law firm does) then it won't work - even the polyfilled versions of fetch can't do it.

Children
No Data