竞赛管理员有权限访问竞赛作品关联的私有项目,但访问关联项目的讨论区却报403
This commit is contained in:
parent
055b05bac9
commit
9d6f75fb3e
|
@ -33,7 +33,7 @@ class BoardsController < ApplicationController
|
|||
#modify by nwb
|
||||
@flag = params[:flag] || false
|
||||
if @project
|
||||
if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin?
|
||||
if !@project.is_public? && !User.current.member_of?(@project) && !User.current.admin? && !User.current.allowed_to?(:view_messages, @project)
|
||||
render_403
|
||||
else
|
||||
@boards = @project.boards.includes(:last_message => :author).all
|
||||
|
|
Loading…
Reference in New Issue