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: 58194b0ea1371e09a7e0cbb23468f748bd3e7650 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module SelectForProjectAuthorization
  extend ActiveSupport::Concern

  module ClassMethods
    def select_for_project_authorization
      select("projects.id AS project_id, members.access_level")
    end

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