未登录时,竞赛页面点击左侧导航栏“提交”不应报没有权限,应该跳转到登录页面
This commit is contained in:
parent
181ccbf287
commit
2dab7d81ff
|
@ -300,7 +300,11 @@ class WorksController < ApplicationController
|
|||
|
||||
#当前用户是不是竞赛的成员
|
||||
def member_of_contest
|
||||
render_403 unless @contest.is_public==1 || User.current.member_of_contest?(@contest) || User.current.admin?
|
||||
if !User.current.logged?
|
||||
redirect_to signin_url
|
||||
else
|
||||
render_403 unless @contest.is_public==1 || User.current.member_of_contest?(@contest) || User.current.admin?
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue