Class: Users::DisallowPossibleSpamService
- Inherits:
-
BaseService
- Object
- BaseService
- Users::DisallowPossibleSpamService
- Defined in:
- app/services/users/disallow_possible_spam_service.rb
Instance Attribute Summary
Attributes inherited from BaseService
#current_user, #params, #project
Instance Method Summary collapse
- #execute(user) ⇒ Object
-
#initialize(current_user) ⇒ DisallowPossibleSpamService
constructor
A new instance of DisallowPossibleSpamService.
Methods included from BaseServiceUtility
#deny_visibility_level, #event_service, #log_error, #log_info, #notification_service, #system_hook_service, #todo_service, #visibility_level
Methods included from Gitlab::Allowable
Constructor Details
#initialize(current_user) ⇒ DisallowPossibleSpamService
Returns a new instance of DisallowPossibleSpamService.
5 6 7 |
# File 'app/services/users/disallow_possible_spam_service.rb', line 5 def initialize(current_user) @current_user = current_user end |
Instance Method Details
#execute(user) ⇒ Object
9 10 11 |
# File 'app/services/users/disallow_possible_spam_service.rb', line 9 def execute(user) user.custom_attributes.by_key(UserCustomAttribute::ALLOW_POSSIBLE_SPAM).delete_all end |