FIX 重新定义项目权限控制的相关方法

This commit is contained in:
Jasder
2020-05-18 18:22:50 +08:00
parent 3158a879a4
commit e8ac921aa9
2 changed files with 18 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ module OperateProjectAbilityAble
end
def authorizate_user_can_edit_project!
return if current_user.project_manager? @project || current_user.admin?
return if @project.manager?(current_user) || current_user.admin?
render_forbidden('你没有权限操作.')
end