redmine-0.8-issue-assignment-right.patch

Patch - issue assigment permission - Yohann Monnier, 2009-06-08 13:40

Download (3.31 KB)

View differences:

app/views/issues/_form.rhtml (copie de travail)
23 23
<% end %>
24 24

  
25 25
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p>
26

  
27
<% if User.current.allowed_to?(:manage_issue_assignment, @project) -%>
26 28
<p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %></p>
29
<% else %>
30
<p><label><%=l(:field_assigned_to)%></label><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></p>
31
<% end %>
32

  
27 33
<% unless @project.issue_categories.empty? %>
28 34
<p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %>
29 35
<%= prompt_to_remote(l(:label_issue_category_new),
app/views/issues/_form_update.rhtml (copie de travail)
1 1
<div class="splitcontentleft">
2 2
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p>
3
<% if User.current.allowed_to?(:manage_issue_assignment, @project) -%>
3 4
<p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %></p>
5
<% else %>
6
<p><label><%=l(:field_assigned_to)%></label><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></p>
7
<% end %>
4 8
</div>
5 9
<div class="splitcontentright">
6 10
<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
lang/en.yml (copie de travail)
275 275
permission_edit_own_messages: Edit own messages
276 276
permission_delete_messages: Delete messages
277 277
permission_delete_own_messages: Delete own messages
278
permission_manage_issue_assignment: Assign an issue
278 279

  
279 280
project_module_issue_tracking: Issue tracking
280 281
project_module_time_tracking: Time tracking
lang/fr.yml (copie de travail)
275 275
permission_edit_own_messages: Modifier ses propres messages
276 276
permission_delete_messages: Supprimer les messages
277 277
permission_delete_own_messages: Supprimer ses propres messages
278
permission_manage_issue_assignment: Assigner une demande
278 279

  
279 280
project_module_issue_tracking: Suivi des demandes
280 281
project_module_time_tracking: Suivi du temps passé
lib/redmine.rb (copie de travail)
37 37
    map.permission :add_issues, {:issues => :new}
38 38
    map.permission :edit_issues, {:issues => [:edit, :reply, :bulk_edit]}
39 39
    map.permission :manage_issue_relations, {:issue_relations => [:new, :destroy]}
40
    map.permission :manage_issue_assignment, {}
40 41
    map.permission :add_issue_notes, {:issues => [:edit, :reply]}
41 42
    map.permission :edit_issue_notes, {:journals => :edit}, :require => :loggedin
42 43
    map.permission :edit_own_issue_notes, {:journals => :edit}, :require => :loggedin