Module: ControllerWithCrossProjectAccessCheck
- Extended by:
- ActiveSupport::Concern
- Included in:
- Dashboard::ApplicationController, Groups::ApplicationController, Groups::Clusters::IntegrationsController, Groups::ClustersController, SearchController, UsersController
- Defined in:
- app/controllers/concerns/controller_with_cross_project_access_check.rb
Instance Method Summary collapse
Instance Method Details
#authorize_cross_project_page! ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'app/controllers/concerns/controller_with_cross_project_access_check.rb', line 15 def return if can?(current_user, :read_cross_project) = _( "This page is unavailable because you are not allowed to read information "\ "across multiple projects." ) access_denied!() end |
#cross_project_check ⇒ Object
11 12 13 |
# File 'app/controllers/concerns/controller_with_cross_project_access_check.rb', line 11 def cross_project_check if Gitlab::CrossProjectAccess.find_check(self)&.should_run?(self) end |