fix: annoymous user visit project

This commit is contained in:
yystopf 2021-09-07 15:17:52 +08:00
parent 30e4ab98db
commit 74a9743bcc
1 changed files with 4 additions and 4 deletions

View File

@ -762,10 +762,10 @@ class ApplicationController < ActionController::Base
if @project and current_user.can_read_project?(@project)
logger.info "########### has project and can read project"
@project
elsif @project && current_user.is_a?(AnonymousUser)
logger.info "###########This is AnonymousUser"
@project = nil if !@project.is_public?
render_forbidden and return
# elsif @project && current_user.is_a?(AnonymousUser)
# logger.info "###########This is AnonymousUser"
# @project = nil if !@project.is_public?
# render_forbidden and return
else
logger.info "###########project not found"
@project = nil