OSDN Git Service

Only project admin have access to deploy_keys section
authormiks <miks@cubesystems.lv>
Thu, 29 Dec 2011 21:46:18 +0000 (23:46 +0200)
committermiks <miks@cubesystems.lv>
Thu, 29 Dec 2011 21:46:18 +0000 (23:46 +0200)
app/controllers/deploy_keys_controller.rb

index 2a5b1bc..6e04bb4 100644 (file)
@@ -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])