Commit 378ed082 authored by Doug Stull's avatar Doug Stull

Merge branch 'mk_recategorize_endpoints_to_fulfillment' into 'master'

Move endpoints to purchase category

See merge request gitlab-org/gitlab!84281
parents 6b10acfb 0cfb4543
......@@ -67,7 +67,7 @@ module EE
use :gitlab_subscription_optional_attributes
end
end
put ':id' do
put ':id', feature_category: :subgroups do
authenticated_as_admin!
namespace = find_namespace(params[:id])
......@@ -89,7 +89,7 @@ module EE
requires :start_date, type: Date, desc: 'The date when subscription was started'
end
post ":id/gitlab_subscription" do
post ":id/gitlab_subscription", feature_category: :purchase do
authenticated_as_admin!
namespace = find_namespace!(params[:id])
......@@ -107,7 +107,7 @@ module EE
desc 'Returns the subscription for the namespace' do
success ::EE::API::Entities::GitlabSubscription
end
get ":id/gitlab_subscription" do
get ":id/gitlab_subscription", feature_category: :purchase do
namespace = find_namespace!(params[:id])
authorize! :admin_namespace, namespace
......@@ -120,7 +120,7 @@ module EE
params do
use :gitlab_subscription_optional_attributes
end
put ":id/gitlab_subscription" do
put ":id/gitlab_subscription", feature_category: :purchase do
authenticated_as_admin!
namespace = find_namespace!(params[:id])
......
......@@ -6,8 +6,6 @@ module API
before { authenticate! }
feature_category :subgroups
helpers do
params :optional_list_params_ee do
# EE::API::Namespaces would override this helper
......@@ -32,7 +30,7 @@ module API
use :pagination
use :optional_list_params_ee
end
get do
get feature_category: :subgroups do
owned_only = params[:owned_only] == true
namespaces = current_user.admin ? Namespace.all : current_user.namespaces(owned_only: owned_only)
......@@ -54,7 +52,7 @@ module API
params do
requires :id, type: String, desc: "Namespace's ID or path"
end
get ':id', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
get ':id', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS, feature_category: :subgroups do
user_namespace = find_namespace!(params[:id])
present user_namespace, with: Entities::Namespace, current_user: current_user
......@@ -67,7 +65,7 @@ module API
requires :namespace, type: String, desc: "Namespace's path"
optional :parent_id, type: Integer, desc: "The ID of the parent namespace. If no ID is specified, only top-level namespaces are considered."
end
get ':namespace/exists', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
get ':namespace/exists', requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS, feature_category: :subgroups do
namespace_path = params[:namespace]
exists = Namespace.without_project_namespaces.by_parent(params[:parent_id]).filter_by_path(namespace_path).exists?
......
......@@ -1094,7 +1094,7 @@ module API
requires :credit_card_mask_number, type: String, desc: 'The last 4 digits of credit card number'
requires :credit_card_type, type: String, desc: 'The credit card network name'
end
put ":user_id/credit_card_validation", feature_category: :users do
put ":user_id/credit_card_validation", feature_category: :purchase do
authenticated_as_admin!
user = find_user(params[:user_id])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment