mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 13:45:44 +08:00
FIX load project bug
This commit is contained in:
@@ -10,7 +10,7 @@ class ApplicationController < ActionController::Base
|
|||||||
include LoggerHelper
|
include LoggerHelper
|
||||||
include LoginHelper
|
include LoginHelper
|
||||||
include RegisterHelper
|
include RegisterHelper
|
||||||
|
|
||||||
protect_from_forgery prepend: true, unless: -> { request.format.json? }
|
protect_from_forgery prepend: true, unless: -> { request.format.json? }
|
||||||
|
|
||||||
before_action :check_sign
|
before_action :check_sign
|
||||||
@@ -749,7 +749,7 @@ class ApplicationController < ActionController::Base
|
|||||||
if @project and current_user.can_read_project?(@project)
|
if @project and current_user.can_read_project?(@project)
|
||||||
logger.info "###########: has project and can read project"
|
logger.info "###########: has project and can read project"
|
||||||
@project
|
@project
|
||||||
elsif current_user.is_a?(AnonymousUser)
|
elsif @project && current_user.is_a?(AnonymousUser)
|
||||||
logger.info "###########:This is AnonymousUser"
|
logger.info "###########:This is AnonymousUser"
|
||||||
@project = nil if !@project.is_public?
|
@project = nil if !@project.is_public?
|
||||||
render_forbidden and return
|
render_forbidden and return
|
||||||
|
|||||||
Reference in New Issue
Block a user