##// END OF EJS Templates
Removed :move_issues permission (#18855)....
Removed :move_issues permission (#18855). This permission was wrongly used to allow bulk issue copy. To prevent user from moving an issue to another project, the project field should now be set to read-only in the workflow permissions. A migration does this automatically for roles that have the edit_issues permission without having the move_issues permission. git-svn-id: http://svn.redmine.org/redmine/trunk@13981 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r13599:01f673be08be
r13599:01f673be08be
Show More
20150208105930_replace_move_issues_permission.rb
18 lines | 663 B | text/x-ruby | RubyLexer
/ db / migrate / 20150208105930_replace_move_issues_permission.rb
class ReplaceMoveIssuesPermission < ActiveRecord::Migration
def self.up
Role.all.each do |role|
if role.has_permission?(:edit_issues) && !role.has_permission?(:move_issues)
# inserts one ligne per trakcer and status
WorkflowPermission.connection.insert_sql(
"INSERT INTO #{WorkflowPermission.table_name} (tracker_id, old_status_id, role_id, type, field_name, rule)" +
" SELECT t.id, s.id, #{role.id}, 'WorkflowPermission', 'project_id', 'readonly'" +
" FROM #{Tracker.table_name} t, #{IssueStatus.table_name} s"
)
end
end
end
def self.down
raise IrreversibleMigration
end
end