Project

General

Profile

Defect #37685 » dont_show_projects_when_not_allowed_in_workflow_permissions.patch

salman mp, 2022-09-18 16:52

View differences:

app/helpers/issues_helper.rb (revision 1297b79bd0699bdecefa22ac0b38ec9198b6b7b9) → app/helpers/issues_helper.rb (date 1663507364578)
end
def projects_for_select(issue)
if issue.parent_issue_id.present?
issue.allowed_target_projects_for_subtask(User.current)
elsif @project && issue.new_record? && !issue.copy?
issue.allowed_target_projects(User.current, 'tree')
else
issue.allowed_target_projects(User.current)
projects =
if issue.parent_issue_id.present?
issue.allowed_target_projects_for_subtask(User.current)
elsif @project && issue.new_record? && !issue.copy?
issue.allowed_target_projects(User.current, 'tree')
else
issue.allowed_target_projects(User.current)
end
if issue.read_only_attribute_names(User.current).include?('project_id')
params['project_id'].present? ? Project.where(identifier: params['project_id']) : projects
else
projects
end
end
end
(1-1/3)