summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-10-27 21:56:03 +0100
committerPhil Hughes <me@iamphill.com>2017-10-27 21:56:03 +0100
commit496c750e3f387624fd51a37954efe87ef6b465bd (patch)
treeb94bd0e1b1e0e7ae179cd2cdb91aa194d7276eb2 /lib/api/helpers.rb
parent90b06afdeaa13fe14218a53c8afbc4802af53a27 (diff)
parentdfd6c3f824ada5558546b809fd32468325788b94 (diff)
downloadgitlab-ce-ph-multi-file-upload-file.tar.gz
Merge branch 'master' into ph-multi-file-upload-fileph-multi-file-upload-file
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