anteo / redmine_custom_workflows

Allows to create custom workflows for Redmine
http://www.redmine.org/plugins/custom-workflows
GNU General Public License v2.0
182 stars 72 forks source link

Is it possible to change current user? #158

Closed oamoris closed 2 years ago

oamoris commented 4 years ago

I have bot user which is author of many autocreated issues. When I changing status of issue I want to use authors' externded workflow (standard redmine workflow) rights for that issue. So I need to change current user to bot user with prevelege rights, like sudo in linux. Is it possible?

picman commented 4 years ago

Not sure, but I'd try something like that:

original_user = User.current
User.current = new_user
...
User.current = original_user