From f01277978010c134e3a0c05ee085f60a78d6228f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Zrim=C5=A1ek?= Date: Mon, 5 Jun 2017 10:02:16 +0200 Subject: [PATCH] Renamed before_action for repository edit and destroy action. [fix 1269] --- app/controllers/repositories_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 365656061..207202fda 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -1,8 +1,8 @@ class RepositoriesController < ApplicationController before_action :load_vars before_action :check_view_all_permissions, only: :index - before_action :check_edit_permissions, only: %(destroy destroy_modal - rename_modal update) + before_action :check_edit_and_destroy_permissions, only: + %(destroy destroy_modal rename_modal update) def index render('repositories/index') @@ -74,7 +74,7 @@ class RepositoriesController < ApplicationController render_403 unless can_view_team_repositories(@team) end - def check_edit_permissions + def check_edit_and_destroy_permissions render_403 unless can_edit_repository(@repository) end