角色多选的时候权限控制

This commit is contained in:
huang 2015-04-29 16:46:34 +08:00
parent 84a7bb5907
commit dfcc076a7f
2 changed files with 8 additions and 8 deletions

View File

@ -17,7 +17,7 @@
<% end %> <% end %>
<!--退出项目--> <!--退出项目-->
<% if (User.current.member_of? @project) && User.current.login? && !User.current.admin && <% if (User.current.member_of? @project) && User.current.login? && !User.current.admin &&
Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.first.to_s != "Manager" %> !Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.first.to_s.include?("Manager") %>
<%= exit_project_link(@project) %> <%= exit_project_link(@project) %>
<% end %> <% end %>