Defect #31748
closedWorkflow can't prevent users to create new issue for specific tracker
0%
Description
TrackerA, default status: New.
RoleA: AddIssue enabled.
Workflow for RoleA and TrackerA: disable all status from the first line: "New issue".
UserA has only RoleA's permission in ProjectA.
Try to New Issue, as TrackerA.
Expected Result: since all status are disabled for this role and this tracker, there should be no status available for this user. So we can prevent this user to create new issue for TrackerA.
Actual Result: The default status of TrackerA set by tracker settings, will be available when this user try to create new issue.
This issue fails on both 4.0.2 and 4.0.3
Environment:
Redmine version 4.0.2.stable
Ruby version 2.6.2-p47 (2019-03-13) [x86_64-linux-gnu]
Rails version 5.2.2
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.9.7
Cvs 1.12.13
Git 2.17.1
Filesystem
GitRemote 2.17.1
Updated by Taine Woo over 5 years ago
maybe because of this:
app/models/issue.rb
Line 1001:
statuses << initial_status unless statuses.empty? statuses << default_status if include_default || (new_record? && statuses.empty?)
Updated by Mizuki ISHIKAWA over 5 years ago
I was able to reproduce this problem.
Updated by Taine Woo over 5 years ago
- Status changed from New to Resolved
Resolved by detail view of each role under Roles and Permissions, and disable "Add issues" for specific tracker, by default "All trackers" will be selected.
Updated by Holger Just over 5 years ago
- Status changed from Resolved to Closed
- Resolution set to Wont fix
This is expected behavior. To prevent users to create issues in a specific tracker, remove the Add issues permission for that tracker.