Defect #37685 » dont_show_projects_when_not_allowed_in_workflow_permissions.patch
| app/helpers/issues_helper.rb (revision 1297b79bd0699bdecefa22ac0b38ec9198b6b7b9) → app/helpers/issues_helper.rb (date 1663507364578) | ||
|---|---|---|
| 750 | 750 |
end |
| 751 | 751 | |
| 752 | 752 |
def projects_for_select(issue) |
| 753 |
if issue.parent_issue_id.present? |
|
| 754 |
issue.allowed_target_projects_for_subtask(User.current) |
|
| 755 |
elsif @project && issue.new_record? && !issue.copy? |
|
| 756 |
issue.allowed_target_projects(User.current, 'tree') |
|
| 757 |
else |
|
| 758 |
issue.allowed_target_projects(User.current) |
|
| 753 |
projects = |
|
| 754 |
if issue.parent_issue_id.present? |
|
| 755 |
issue.allowed_target_projects_for_subtask(User.current) |
|
| 756 |
elsif @project && issue.new_record? && !issue.copy? |
|
| 757 |
issue.allowed_target_projects(User.current, 'tree') |
|
| 758 |
else |
|
| 759 |
issue.allowed_target_projects(User.current) |
|
| 760 |
end |
|
| 761 |
if issue.read_only_attribute_names(User.current).include?('project_id')
|
|
| 762 |
params['project_id'].present? ? Project.where(identifier: params['project_id']) : projects |
|
| 763 |
else |
|
| 764 |
projects |
|
| 759 | 765 |
end |
| 760 | 766 |
end |
| 761 | 767 |
end |