Bottelet / DaybydayCRM

DaybydayCRM an open-source CRM, to help you keep track of your daily workflow.
https://daybydaycrm.com
2.24k stars 752 forks source link

Unable to change user role #175

Closed rm-yakovenko closed 4 years ago

rm-yakovenko commented 4 years ago

$role->first() makes a db query and fetches the first item in the roles table. And it's Owner.

Bottelet commented 4 years ago

@rm-yakovenko Can you please update the user controller test, to ensure you need to be "OWNER" before you can do an update

rm-yakovenko commented 4 years ago

@Bottelet Fixed one more issue related to role changing.

Can you please update the user controller test, to ensure you need to be "OWNER" before you can do an update

I'm not sure that I got it right. Let me know if the provided test isn't ok.

Bottelet commented 4 years ago

Thanks for your contribution! I made a few changes, but I really appreciate the work!

You can see the changes here if interested: https://github.com/Bottelet/DaybydayCRM/commit/bff89c530600fe1c0fac56f5b488545726c29dbb