From 6902848a9c54f9eb1bfd82fe173ad0d5d62fe2d5 Mon Sep 17 00:00:00 2001 From: Markus Koller Date: Mon, 18 Sep 2017 15:03:24 +0200 Subject: Support custom attributes on projects --- lib/api/helpers.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/api/helpers.rb') diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 1c12166e434..5f9b94cc89c 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -328,6 +328,7 @@ module API finder_params[:archived] = params[:archived] finder_params[:search] = params[:search] if params[:search] finder_params[:user] = params.delete(:user) if params[:user] + finder_params[:custom_attributes] = params[:custom_attributes] if params[:custom_attributes] finder_params end -- cgit v1.2.1 From 1162d89ac49553c579ec4d049e74206893ff6302 Mon Sep 17 00:00:00 2001 From: Travis Miller Date: Mon, 13 Nov 2017 16:05:44 +0000 Subject: Add administrative endpoint to list all pages domains --- lib/api/helpers.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/api/helpers.rb') diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 5f9b94cc89c..3c8960cb1ab 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -155,6 +155,11 @@ module API end end + def authenticated_with_full_private_access! + authenticate! + forbidden! unless current_user.full_private_access? + end + def authenticated_as_admin! authenticate! forbidden! unless current_user.admin? @@ -190,6 +195,10 @@ module API not_found! unless user_project.pages_available? end + def require_pages_config_enabled! + not_found! unless Gitlab.config.pages.enabled + end + def can?(object, action, subject = :global) Ability.allowed?(object, action, subject) end -- cgit v1.2.1