From: miks Date: Thu, 29 Dec 2011 21:46:18 +0000 (+0200) Subject: Only project admin have access to deploy_keys section X-Git-Tag: v2.1.0~40^2~8 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b85ae02856a522838898442953157006501dde3e;p=wvm%2Fgitlab.git Only project admin have access to deploy_keys section --- diff --git a/app/controllers/deploy_keys_controller.rb b/app/controllers/deploy_keys_controller.rb index 2a5b1bce5..6e04bb4f3 100644 --- a/app/controllers/deploy_keys_controller.rb +++ b/app/controllers/deploy_keys_controller.rb @@ -2,8 +2,10 @@ class DeployKeysController < ApplicationController respond_to :js layout "project" before_filter :project - # before_filter :authorize_admin_project! - # before_filter :require_non_empty_project + + # Authorize + before_filter :add_project_abilities + before_filter :authorize_admin_project! def project @project ||= Project.find_by_code(params[:project_id])