[Bug 1818659] Re: When got a 403 response in glance panel, it will be redirect to log out

mashuting 1818659 at bugs.launchpad.net
Sun May 5 06:47:07 UTC 2019


** Changed in: horizon (Ubuntu)
     Assignee: (unassigned) => mashuting (mashuting)

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to horizon in Ubuntu.
https://bugs.launchpad.net/bugs/1818659

Title:
  When got a 403 response in glance panel, it will be redirect to log
  out

Status in horizon package in Ubuntu:
  New

Bug description:
  Based on implemented by angularjs framework, glance panel has such a problem:
  1. Set get_metadef_namespaces to '!' in glance/policy.json
  2. Log into horizon and direct to image panel
  3. Horizon will accept a response like:
     403 Forbidden: You are not authorized to complete get_metadef_namespaces action. (HTTP 403)"
     Due to the following code, web will be redirect to login page:
    function httpRedirectLogin($q, $rootScope, $window, frameworkEvents, toastService) {
      return {
        responseError: function (error) {
          if (error.status === 401) {
            var msg = gettext('Unauthorized. Redirecting to login');
            handleRedirectMessage(msg, $rootScope, $window, frameworkEvents, toastService);
          }
          if (error.status === 403) {
            var msg2 = gettext('Forbidden. Redirecting to login');
            handleRedirectMessage(msg2, $rootScope, $window, frameworkEvents, toastService);
          }
          return $q.reject(error);
        }
      };
    }

  I don't think it make sense to log out because the policy restricts
  this operation, but have no idea how to optimize. Hope anyone can give
  me suggestions.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/horizon/+bug/1818659/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list