Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 2 Current »

Currently when user has access violation on website we're redirecting him/her to the "no_permission" template. There are several side effects from this approach:

  • user no longer sees url of the page which caused access violation
  • the HTTP response code is now 200 instead of 401

Solution

Proposing to show "No Permission" page inline instead of redirecting to it.

  1. create "kUrlManager::show401" method (similar to "kUrlManager::show404", but will be using "No Permission" template and sending "401" HTTP response code)
  2. change top part (that configures redirect) of "kRequestManager::processPermissionError" method to:
    1. use "kUrlManager::show401" method
    2. get "$event" redirect params and do a SetVar on them right away (since no redirect will be happening)
  3. change top part (that configures redirect) of "kDBEventHandler::_processItemLoadingError" method to use "kUrlManager::show401" method
  4. change part (that configures no permission redirect) of "kPermissionsHeleper::getPermissionTemplate" method to:
    1. use "kUrlManager::show401" method
    2. doing SetVar right away instead of setting keys into "$redirect_params" array

Related Discussions

Related Tasks

  • No labels