Commit 0c4a3a2b6df11b3fc50d7379a0aa63bb15441687

Authored by Victor Costa
1 parent d65a2fb4

Display users that has view_task permission as reponsible candidate

app/controllers/my_profile/tasks_controller.rb
@@ -21,7 +21,7 @@ class TasksController < MyProfileController @@ -21,7 +21,7 @@ class TasksController < MyProfileController
21 21
22 @failed = params ? params[:failed] : {} 22 @failed = params ? params[:failed] : {}
23 23
24 - @responsible_candidates = profile.members.by_role(profile.roles.reject {|r| !r.has_permission?('perform_task')}) if profile.organization? 24 + @responsible_candidates = profile.members.by_role(profile.roles.reject {|r| !r.has_permission?('perform_task') && !r.has_permission?('view_tasks')}) if profile.organization?
25 25
26 @view_only = !current_person.has_permission?(:perform_task, profile) 26 @view_only = !current_person.has_permission?(:perform_task, profile)
27 end 27 end