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

Remove user from groups when locked #343

Closed marmat1 closed 5 months ago

marmat1 commented 5 months ago

I would like to remove users from their groups when they are locked.

I have tried with an user after saving observable object workflow:

if (self.locked?)
  self.groups.remove
end

Is there any method in user or group classes to get it?

Many thanks.

picman commented 5 months ago
if locked?
  groups.delete_all
end
marmat1 commented 5 months ago

Perfect! It works!

if self.locked? self.groups.delete_all end