BigW Consortium Gitlab

select_for_project_authorization.rb 364 Bytes
Newer Older
1 2 3 4 5
module SelectForProjectAuthorization
  extend ActiveSupport::Concern

  module ClassMethods
    def select_for_project_authorization
6 7 8 9 10
      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"])
11 12 13
    end
  end
end