2020-11-24 15:15:51 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module IssueLinks
|
|
|
|
class DestroyService < IssuableLinks::DestroyService
|
2022-06-21 17:19:12 +05:30
|
|
|
include IncidentManagement::UsageData
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
private
|
|
|
|
|
|
|
|
def permission_to_remove_relation?
|
|
|
|
can?(current_user, :admin_issue_link, source) && can?(current_user, :admin_issue_link, target)
|
|
|
|
end
|
|
|
|
|
|
|
|
def track_event
|
|
|
|
track_incident_action(current_user, target, :incident_unrelate)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|