From 0c4a3a2b6df11b3fc50d7379a0aa63bb15441687 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Thu, 18 Jun 2015 16:50:21 -0300 Subject: [PATCH] Display users that has view_task permission as reponsible candidate --- app/controllers/my_profile/tasks_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/my_profile/tasks_controller.rb b/app/controllers/my_profile/tasks_controller.rb index 9ad3b92..4784fb9 100644 --- a/app/controllers/my_profile/tasks_controller.rb +++ b/app/controllers/my_profile/tasks_controller.rb @@ -21,7 +21,7 @@ class TasksController < MyProfileController @failed = params ? params[:failed] : {} - @responsible_candidates = profile.members.by_role(profile.roles.reject {|r| !r.has_permission?('perform_task')}) if profile.organization? + @responsible_candidates = profile.members.by_role(profile.roles.reject {|r| !r.has_permission?('perform_task') && !r.has_permission?('view_tasks')}) if profile.organization? @view_only = !current_person.has_permission?(:perform_task, profile) end -- libgit2 0.21.2