Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2017-02-10 17:13:02 +08:00
commit f844e44675
4 changed files with 4 additions and 4 deletions

View File

@ -397,7 +397,7 @@ update
end
def show
if @project.hidden_repo && (role_of_members_in_project(@project.id, User.current.id) == "Reporter" || !is_project_member?(User.current.id, @project.id))
if !User.current.admin? && (@project.hidden_repo && (role_of_members_in_project(@project.id, User.current.id) == "Reporter" || !is_project_member?(User.current.id, @project.id)))
render_403
return
else

View File

@ -50,7 +50,7 @@
<% end %>
<!--版本库-->
<% if visible_repository?(@project) %>
<% unless @project.hidden_repo && (role_of_members_in_project(@project.id, User.current.id) == "Reporter" || !is_project_member?(User.current.id, @project.id)) %>
<% if User.current.admin? || (is_project_member?(User.current.id, @project.id) && role_of_members_in_project(@project.id, User.current.id) != "Reporter" ) %>
<li id="project_menu_05"><%= link_to @project.project_score.changeset_num.to_i > 0 ? "#{l(:project_module_repository)}<span class='issues_nav_tag ml5'>#{switch_integer_into_k project_score.changeset_num}</span>".html_safe : "#{l(:project_module_repository)}",({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).try(:identifier)}), :class => "pro_new_proname", :title => "#{project_score.changeset_num}" %>
</li>
<% end %>

View File

@ -48,7 +48,7 @@
<li class="mt10 ml35 mb10">
<label class="mr27">&nbsp;</label>
<a href="javascript:void(0);" class="sy_btn_grey fl" id="upload_files_cancle_btn" onclick="hideModal()">取&nbsp;&nbsp;消</a>
<%= submit_tag '确定',:onclick => 'submit_files();',:onfocus=>'this.blur()',:id=>'upload_files_submit_btn',:class=>'sy_btn_blue fl ml20' %>
<%= submit_tag '确定',:onclick => 'submit_files();',:onfocus=>'this.blur()',:class=>'sy_btn_blue fl ml20' %>
<div class="cl"></div>
</li>
</div>

View File

@ -17,7 +17,7 @@
</li>
</ul>
<!-- <a href="javascript:void(0);" class="btn btn-green fr mr15 mt10"> 新建 </a>-->
<% if is_project_member?(User.current.id, @project.id) || User.current.admin? %>
<% if ( is_project_member?(User.current.id, @project.id) && role_of_members_in_project(@project.id, User.current.id) != 'Reporter') || User.current.admin? %>
<%= link_to "新建", new_project_version_path(@project, :is_create => true), :class => 'btn btn-green fr mr15 mt10', :remote => true %>
<% end %>
</div>