From 1ea2d9faa518f6b769b05a71a1f93b4ea0226bc1 Mon Sep 17 00:00:00 2001 From: Alessio Caiazza Date: Thu, 13 Dec 2018 12:08:53 +0100 Subject: Add releases API This commit introduces Releases API under /api/v4/projects/:id/releases * We are introducing release policies at project level. * We are deprecating releases changes from tags, both api and web interface. * Tags::CreateService no longer create a release This feature is controlled by :releases_page feature flag --- app/controllers/projects/releases_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/controllers/projects/releases_controller.rb') diff --git a/app/controllers/projects/releases_controller.rb b/app/controllers/projects/releases_controller.rb index 58d5ea4762f..62bdc84b41a 100644 --- a/app/controllers/projects/releases_controller.rb +++ b/app/controllers/projects/releases_controller.rb @@ -3,7 +3,7 @@ class Projects::ReleasesController < Projects::ApplicationController # Authorize before_action :require_non_empty_project - before_action :authorize_download_code! + before_action :authorize_read_release! before_action :check_releases_page_feature_flag def index @@ -12,8 +12,8 @@ class Projects::ReleasesController < Projects::ApplicationController private def check_releases_page_feature_flag - return render_404 unless Feature.enabled?(:releases_page) + return render_404 unless Feature.enabled?(:releases_page, @project) - push_frontend_feature_flag(:releases_page) + push_frontend_feature_flag(:releases_page, @project) end end -- cgit v1.2.1