From 8d1ab256bfc9dc0af5aefbb86b1a4b96c4d7c12d Mon Sep 17 00:00:00 2001 From: Travis Miller Date: Mon, 21 Aug 2017 18:59:54 -0500 Subject: Add pages domains API implementation --- lib/api/helpers.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/api/helpers.rb') diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index 2b316b58ed9..7a2ec865860 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -184,6 +184,10 @@ module API end end + def require_pages_enabled! + not_found! unless user_project.pages_available? + end + def can?(object, action, subject = :global) Ability.allowed?(object, action, subject) end -- cgit v1.2.1