mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-07 21:51:42 +08:00
init project
This commit is contained in:
12
app/controllers/concerns/operate_project_ability_able.rb
Normal file
12
app/controllers/concerns/operate_project_ability_able.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module OperateProjectAbilityAble
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
end
|
||||
|
||||
def authorizate_user_can_edit_project!
|
||||
return if current_user.project_manager? @project || current_user.admin?
|
||||
render_forbidden('你没有权限操作.')
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user