Change
This commit is contained in:
parent
d40725a605
commit
54b1af8d06
|
@ -750,7 +750,7 @@ class ApplicationController < ActionController::Base
|
||||||
@project
|
@project
|
||||||
elsif current_user.is_a?(AnonymousUser)
|
elsif 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
|
||||||
else
|
else
|
||||||
logger.info "###########:project not found"
|
logger.info "###########:project not found"
|
||||||
|
|
|
@ -116,7 +116,7 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def project_public?
|
def project_public?
|
||||||
return if @project.is_public?
|
return if @project.is_public
|
||||||
|
|
||||||
if current_user
|
if current_user
|
||||||
return if current_user.admin? || @project.member?(current_user.id)
|
return if current_user.admin? || @project.member?(current_user.id)
|
||||||
|
|
|
@ -122,7 +122,7 @@ class Project < ApplicationRecord
|
||||||
|
|
||||||
|
|
||||||
def can_visited?
|
def can_visited?
|
||||||
is_public? || User.current.admin? || member?(User.current)
|
is_public || User.current.admin? || member?(User.current)
|
||||||
end
|
end
|
||||||
|
|
||||||
def releases_size(current_user_id, type)
|
def releases_size(current_user_id, type)
|
||||||
|
|
Loading…
Reference in New Issue