Skip to content

erp5_xhtml_style: redirect to portal if unauthorized to show an error

Tristan Cavelier requested to merge tc/erp5:stderrmsg into master

After going to a resource that you are unauthorized to view, then the error is shown incorrectly because the default UI tries to use properties of the same resource, reraising unauthorized error.

With this commit, if unauthorized is reraised, it tries to show the error from the portal object. If the user is still unauthorized to see the error output, then the error is shown directly without the classic UI.

Merge request reports