From 4c87fb4a5504fb0dac1d6c5ce864851922f7a451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Zrim=C5=A1ek?= Date: Fri, 9 Feb 2018 19:05:09 +0100 Subject: [PATCH] Fixed permission error when restoring task. --- app/controllers/my_modules_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/my_modules_controller.rb b/app/controllers/my_modules_controller.rb index 3b5ae7a6d..d1fb7695c 100644 --- a/app/controllers/my_modules_controller.rb +++ b/app/controllers/my_modules_controller.rb @@ -600,8 +600,10 @@ class MyModulesController < ApplicationController render_404 unless @repository && can_read_team?(@repository.team) end + # NOTE: 'update' action also contains restore (and archive) logic def check_manage_permissions - render_403 unless can_manage_module?(@my_module) + render_403 unless can_manage_module?(@my_module) || + can_restore_module?(@my_module) end def check_view_permissions