summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorTravis Miller <travis@travismiller.com>2017-08-21 18:59:54 -0500
committerTravis Miller <travis@travismiller.com>2017-10-22 08:04:43 -0500
commit8d1ab256bfc9dc0af5aefbb86b1a4b96c4d7c12d (patch)
tree0327290b40e9cfca9f0ef7e92c5b985def9b7acd /lib/api/helpers.rb
parentbcccf6c1619ecd56bbcc515c4a8f057ba34d0ab9 (diff)
downloadgitlab-ce-8d1ab256bfc9dc0af5aefbb86b1a4b96c4d7c12d.tar.gz
Add pages domains API implementation
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb4
1 files changed, 4 insertions, 0 deletions
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