Browse Source

fix: annoymous user visit project

tags/v3.2.0
yystopf 4 years ago
parent
commit
74a9743bcc
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      app/controllers/application_controller.rb

+ 4
- 4
app/controllers/application_controller.rb 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


Loading…
Cancel
Save