Skip to content

Skip learn gitlab unauthenticated spec

Linjie Zhang请求将skip-learn-gitlab-spec合并到main-jh

What does this MR do and why?

skip failed pipeline job https://jihulab.com/gitlab-cn/gitlab/-/jobs/10769932

related upstream MR https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132453

upstream mr add saas label to spec will auto enable Gitlab.com? to true in spec

jh override route_not_found method to 401 make the spec failed

jh/app/controllers/jh/application_controller.rb:

    override :route_not_found
    def route_not_found
      return super unless ::Gitlab.com?
      return super if Gitlab.hk?

      if current_user || browser.bot.search_engine?
        not_found
      else
        store_location_for(:user, request.fullpath) unless request.xhr?

        unauthorized!
      end
    end

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Linjie Zhang 编辑于

合并请求报告

加载中