2017-08-03 22:20:34 -04:00
|
|
|
# rubocop:disable GitlabSecurity/PublicSend
|
|
|
|
|
2016-06-23 11:14:31 -04:00
|
|
|
module API
|
|
|
|
module Helpers
|
|
|
|
module MembersHelpers
|
|
|
|
def find_source(source_type, id)
|
2017-08-03 22:20:34 -04:00
|
|
|
public_send("find_#{source_type}!", id) # rubocop:disable GitlabSecurity/PublicSend
|
2016-06-23 11:14:31 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def authorize_admin_source!(source_type, source)
|
|
|
|
authorize! :"admin_#{source_type}", source
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|