Project

General

Profile

Defect #30431 » 30431-v2.patch

Go MAEDA, 2019-09-22 07:31

View differences:

app/views/roles/_form.html.erb
47 47

  
48 48
<h3><%= l(:label_permissions) %></h3>
49 49
<div class="box tabular" id="permissions">
50
<% perms_by_module = @role.setable_permissions.group_by {|p| p.project_module.to_s} %>
50
<% setable_permissions = @role.setable_permissions %>
51
<% perms_by_module = setable_permissions.group_by {|p| p.project_module.to_s} %>
51 52
<% perms_by_module.keys.sort.each do |mod| %>
52 53
    <% module_name = mod.blank? ? 'module_project' : "module_#{mod}" %>
53 54
    <fieldset id="<%= module_name %>"><legend><%= toggle_checkboxes_link("##{module_name}\ input") %><%= mod.blank? ? l(:label_project) : l_or_humanize(mod, :prefix => 'project_module_') %></legend>
......
67 68

  
68 69
<div id="role-permissions-trackers" class="view_issues_shown">
69 70
<h3><%= l(:label_issue_tracking) %></h3>
70
<% permissions = %w(view_issues add_issues edit_issues add_issue_notes delete_issues) %>
71
<% permissions = [:view_issues, :add_issues, :edit_issues, :add_issue_notes, :delete_issues] & setable_permissions.collect(&:name) %>
71 72

  
72 73
<div class="autoscroll">
73 74
<table class="list">
(3-3/3)