#1836 未登录或者没有权限访问私有项目时,跳转到403页面

This commit is contained in:
sw 2015-01-21 14:30:19 +08:00
parent 0b2fa35a42
commit 520e9c73aa
1 changed files with 5 additions and 0 deletions

View File

@ -558,6 +558,11 @@ class ProjectsController < ApplicationController
# Show @project # Show @project
def show def show
if(@project && !@project.is_public && !User.current.member_of?(@project))
render_403
return
end
@project_type = params[:project_type] @project_type = params[:project_type]
# try to redirect to the requested menu item # try to redirect to the requested menu item