Fixed permission error when restoring task.

This commit is contained in:
Matej Zrimšek 2018-02-09 19:05:09 +01:00
parent 946f516171
commit 4c87fb4a55

View file

@ -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