madzhuga / rails_workflow

Check Wiki for details
MIT License
325 stars 41 forks source link

undefined method `get_role_values' #27

Closed sharat94 closed 7 years ago

sharat94 commented 7 years ago

screenshot from 2017-02-28 17-42-57

How is the roles for the template being taken? Iam using devise and cancancan gem in rails 5 and have got workflow running but it pops an error when i try to add person by role. Please help.

madzhuga commented 7 years ago

@sharat94 please check this model.

madzhuga commented 7 years ago

By default, gem uses user.role or user.group for user operation authorization. Maybe it is better to make this functionality optional and just let any user pick any user operation by default, I haven't decided yet how to handle it better.

madzhuga commented 7 years ago

ps: Right now there are two types of user operations: user group operation and user role operation. User group operation allows only specified group users to complete an operation. User role operation same way allows only users with a specified role to complete an operation. I am going to add default user operation today - it will allow any user to pick up and complete an operaiton.