diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 9001546dc..3ae5538e9 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -29,7 +29,7 @@ class WelcomeController < ApplicationController unless params[:organization].nil? @cur_projects = Project.find(params[:organization]) @organization = @cur_projects.enterprise_name - @organization_projects = current_user.admin? ? Project.where("enterprise_name =? ", @organization) : Project.all_public.where("enterprise_name =? ", @organization) + @organization_projects = (current_user.admin? || User.current.member_of?(@cur_projects)) ? Project.where("enterprise_name =? ", @organization) : Project.all_public.where("enterprise_name =? ", @organization) @e_count = @organization_projects.count @part_projects = [] # 取十个 diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 7187c70d3..15ab84133 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -2520,9 +2520,9 @@ zh: # 项目企业模块 - label_all_enterprises: 所有企业 + label_all_enterprises: 所有组织 label_my_enterprise: 我的企业 - label_enterprise_tips: 暂时还没有该企业对应的项目,系统的其它项目您可能会感兴趣! - label_part_enterprise_tips: 您可能对系统的其它项目会感兴趣! - label_enterprise_nil: 该模块为最新上线模块,目前还未有项目关联到企业! + label_enterprise_tips: 该组织暂时还没创建公开项目,您可能会对系统的其它项目感兴趣! + label_part_enterprise_tips: 您可能对系统的其它项目感兴趣! + label_enterprise_nil: 该模块为最新上线模块,目前还没有创建企业项目! label_enterprises: 组织