Class: FeatureFlagsUserListsFinder
- Inherits:
-
Object
- Object
- FeatureFlagsUserListsFinder
- Defined in:
- app/finders/feature_flags_user_lists_finder.rb
Instance Attribute Summary collapse
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(project, current_user, params = {}) ⇒ FeatureFlagsUserListsFinder
constructor
A new instance of FeatureFlagsUserListsFinder.
Constructor Details
#initialize(project, current_user, params = {}) ⇒ FeatureFlagsUserListsFinder
Returns a new instance of FeatureFlagsUserListsFinder.
6 7 8 9 10 |
# File 'app/finders/feature_flags_user_lists_finder.rb', line 6 def initialize(project, current_user, params = {}) @project = project @current_user = current_user @params = params end |
Instance Attribute Details
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
4 5 6 |
# File 'app/finders/feature_flags_user_lists_finder.rb', line 4 def current_user @current_user end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'app/finders/feature_flags_user_lists_finder.rb', line 4 def params @params end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
4 5 6 |
# File 'app/finders/feature_flags_user_lists_finder.rb', line 4 def project @project end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/finders/feature_flags_user_lists_finder.rb', line 12 def execute unless Ability.allowed?(current_user, :read_feature_flag, project) return Operations::FeatureFlagsUserList.none end items = feature_flags_user_lists by_search(items) end |