All Downloads are FREE. Search and download functionalities are using the official Maven repository.

restx.admin.js.securityHandling.js Maven / Gradle / Ivy

There is a newer version: 1.2.0-rc2
Show newest version
// default security handling; redirect to a login.html page
// you can override this by providing a route for /@/ui/js/securityHandling.js at priority < 0

function onSecurityException(baseUri, response, backTo) {
    if (response.config.headers && response.config.headers.RestxSu && response.status === 403) {
        // do nothing, the forbidden was sent while sudoing, probably in api docs
    } else {
        window.location = baseUri + '/@/ui/login.html?backTo=' + backTo;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy