Browse Source

Merge branch 'dev_trustie' of http://git.trustie.net/jasder/forgeplus into dev_trustie

tags/v1.0.0
sylor_huang@126.com 5 years ago
parent
commit
116356c284
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      app/controllers/application_controller.rb

+ 2
- 2
app/controllers/application_controller.rb View File

@@ -10,7 +10,7 @@ class ApplicationController < ActionController::Base
include LoggerHelper
include LoginHelper
include RegisterHelper
protect_from_forgery prepend: true, unless: -> { request.format.json? }

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


Loading…
Cancel
Save