Skip to content
Snippets Groups Projects
Commit 87bf08c9 authored by James Lopez's avatar James Lopez
Browse files

fix specs

parent 3bab585b
No related branches found
No related tags found
No related merge requests found
module Emails
class CreateService < BaseService
class CreateService < ::Emails::BaseService
def execute(skip_authorization: false)
raise Gitlab::Access::AccessDeniedError unless skip_authorization || can_manage_emails?
 
Loading
Loading
module Emails
class DestroyService < BaseService
class DestroyService < ::Emails::BaseService
def execute(skip_authorization: false)
raise Gitlab::Access::AccessDeniedError unless skip_authorization || can_manage_emails?
 
Loading
Loading
Loading
Loading
@@ -276,7 +276,7 @@ module API
email = user.emails.find_by(id: params[:email_id])
not_found!('Email') unless email
 
Emails::DestroyService.new(current_user, self, email: email.email).execute
Emails::DestroyService.new(current_user, user, email: email.email).execute
 
::Users::UpdateService.new(current_user, user).execute do |user|
user.update_secondary_emails!
Loading
Loading
@@ -510,7 +510,7 @@ module API
email = current_user.emails.find_by(id: params[:email_id])
not_found!('Email') unless email
 
Emails::DestroyService.new(current_user, self, email: email.email).execute
Emails::DestroyService.new(current_user, current_user, email: email.email).execute
 
::Users::UpdateService.new(current_user, current_user).execute do |user|
user.update_secondary_emails!
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment