debian-mirror-gitlab/lib/api/helpers/members_helpers.rb

14 lines
286 B
Ruby
Raw Normal View History

2016-09-13 17:45:13 +05:30
module API
module Helpers
module MembersHelpers
def find_source(source_type, id)
2017-08-17 22:00:37 +05:30
public_send("find_#{source_type}!", id)
2016-09-13 17:45:13 +05:30
end
def authorize_admin_source!(source_type, source)
authorize! :"admin_#{source_type}", source
end
end
end
end