Class: Organizations::OrganizationUsersFinder

Inherits:
Object
  • Object
show all
Defined in:
app/finders/organizations/organization_users_finder.rb

Instance Method Summary collapse

Constructor Details

#initialize(organization:, current_user:) ⇒ OrganizationUsersFinder

Returns a new instance of OrganizationUsersFinder.

Parameters:



10
11
12
13
# File 'app/finders/organizations/organization_users_finder.rb', line 10

def initialize(organization:, current_user:)
  @organization = organization
  @current_user = current_user
end

Instance Method Details

#executeObject



15
16
17
18
19
# File 'app/finders/organizations/organization_users_finder.rb', line 15

def execute
  return User.none if organization.nil? || !authorized?

  all_organization_users
end