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

effective_access_level_per_user_finder.rb « members « projects « finders « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f367b4ca45186bb3c8b70d85953779e2b6501499 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

module Projects
  module Members
    class EffectiveAccessLevelPerUserFinder < EffectiveAccessLevelFinder
      def initialize(project, user)
        @project = project
        @user = user
      end

      private

      attr_reader :user

      def apply_scopes(members)
        super.where(user_id: user.id) # rubocop: disable CodeReuse/ActiveRecord
      end
    end
  end
end