drhenner / ror_ecommerce

Ruby on Rails Ecommerce platform, perfect for your small business solution.
www.ror-e.com
MIT License
1.21k stars 409 forks source link

Adding users with roles - Role based access to users #155

Closed ghost closed 9 years ago

ghost commented 9 years ago

I am unable to add users with at least one role assigned to the user. For example if I don't check any roles, it gets created as a regular user. He doesn't have any other roles. Interestingly in the db table there are no roles assigned to this user

When I check one of the roles (administrator), and click create, it returns back to the same Add User page and user is not created. In the DB the new user is not there as well. The logs say Rollback.

This image is the screen

screen shot 2015-09-09 at 12 24 19 pm

This image is the log showing rollback

image

Basically I would like to give role based access to users using the default roles you have provided. I am for now unable to make it to work. I would appreciate any help in this direction.

Thanks Raghu

drhenner commented 9 years ago

Raghu,

Try to create without the roles assigned and then update the user with the roles assigned... I think that is a work-around but I'll come up with a fix later

ghost commented 9 years ago

Thank you David for you prompt response. It is very help full.

Thanks

On Wednesday 09 September 2015 11:16 PM, D. R. Henner wrote:

Raghu,

Try to create without the roles assigned and then update the user with the roles assigned... I think that is a work-around but I'll come up with a fix later

— Reply to this email directly or view it on GitHub https://github.com/drhenner/ror_ecommerce/issues/155#issuecomment-138988271.

drhenner commented 9 years ago

BTW: the code is fixed now