fix manager can view
This commit is contained in:
parent
87682c2cf4
commit
be6aa8c70e
|
@ -141,17 +141,23 @@ class RecruitmentsController < PseudoSessionController
|
||||||
|
|
||||||
def check_session
|
def check_session
|
||||||
page = Page.where(:module => "pseudo_member").first
|
page = Page.where(:module => "pseudo_member").first
|
||||||
session = OrbitHelper.request.session
|
|
||||||
available = session[:current_pseudo_user_id].present? && !session[:current_pseudo_user_id].nil? ? true : false
|
|
||||||
|
|
||||||
if !OrbitHelper.current_user.nil?
|
if !OrbitHelper.current_user.nil?
|
||||||
available = OrbitHelper.current_user.is_admin?
|
if OrbitHelper.current_user.is_admin?
|
||||||
end
|
available = true
|
||||||
if available || available == "true"
|
enabled = true
|
||||||
pu = PseudoUser.find(session[:current_pseudo_user_id])
|
else
|
||||||
enabled = RecruitProfile.where(:pseudo_member_id => pu.user_name).first.enabled
|
available = false
|
||||||
|
enabled = false
|
||||||
|
end
|
||||||
else
|
else
|
||||||
enabled = false
|
session = OrbitHelper.request.session
|
||||||
|
available = session[:current_pseudo_user_id].present? && !session[:current_pseudo_user_id].nil? ? true : false
|
||||||
|
if available || available == "true"
|
||||||
|
pu = PseudoUser.find(session[:current_pseudo_user_id])
|
||||||
|
enabled = RecruitProfile.where(:pseudo_member_id => pu.user_name).first.enabled
|
||||||
|
else
|
||||||
|
enabled = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
{
|
{
|
||||||
"session" => available,
|
"session" => available,
|
||||||
|
|
Loading…
Reference in New Issue