Welcome to mirror list, hosted at ThFree Co, Russian Federation.

select_for_project_authorization.rb « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 49342e30db62c0d6554a8f373bb930bbaa9a2a88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module SelectForProjectAuthorization
  extend ActiveSupport::Concern

  class_methods do
    def select_for_project_authorization
      select("projects.id AS project_id", "members.access_level")
    end

    def select_as_maintainer_for_project_authorization
      select(["projects.id AS project_id", "#{Gitlab::Access::MAINTAINER} AS access_level"])
    end
  end
end