修改不同角色拥有的权限

管理员--配置、项目类型
开发人员-- 配置、退出项目
报告者-- 退出项目(admin可以配)
This commit is contained in:
huang 2015-04-30 07:46:07 +08:00
parent 73798a0da4
commit 389266e3e5
1 changed files with 2 additions and 2 deletions

View File

@ -12,12 +12,12 @@
<%= link_to "<span class='pr_setting'></span>#{l(:button_configure)}".html_safe, settings_project_path(@project), :class => "pr_join_a" %>
<% end %>
<!--项目类型-->
<% if (User.current.login? && User.current.member_of?(@project) && Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.first.to_s.include?("Manager")) || User.current.admin? %>
<% if (User.current.login? && User.current.member_of?(@project) && Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager")) || User.current.admin? %>
<%= link_to "<span class='#{typeclass}'></span>#{text}".html_safe,"javascript:void(0)" ,:onClick => "show_window();", :class => "pr_join_a",:id => "setting_project_type"%>
<% end %>
<!--退出项目-->
<% 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.include?("Manager") %>
!Member.where(:user_id => User.current.id, :project_id => @project.id).first.roles.to_s.include?("Manager") %>
<%= exit_project_link(@project) %>
<% end %>