公开组织的资源,非成员不能看到私有资源

This commit is contained in:
ouyangxuhua 2016-03-07 17:41:43 +08:00
parent 699e1f41a7
commit d70df6a89d
1 changed files with 61 additions and 59 deletions

View File

@ -1,6 +1,7 @@
<% delete_allowed = User.current.admin? %> <% delete_allowed = User.current.admin? %>
<% org_subfield_attachments.each do |file| %> <% org_subfield_attachments.each do |file| %>
<% if file.is_public == 1 or User.current.member_of_org?(file.container.organization) %>
<div class="resources mt10" id="container_files_<%= file.id %>"> <div class="resources mt10" id="container_files_<%= file.id %>">
<div class="homepagePostBrief"> <div class="homepagePostBrief">
<div class="homepagePostPortrait"> <div class="homepagePostPortrait">
@ -66,6 +67,7 @@
</div><!---re_con_box end--> </div><!---re_con_box end-->
<% end %> <% end %>
<% end %>
<% if org_subfield_attachments.count == 10 %> <% if org_subfield_attachments.count == 10 %>
<% if params[:action] == 'search_files_in_subfield' %> <% if params[:action] == 'search_files_in_subfield' %>