Closed handhikadj closed 6 years ago
Look at this documentation. https://laravel.com/docs/5.6/authorization#writing-policies Your current authenticated user trying to see other user information. By default a basic user can't see other user information. Need to create a admin user to see other user information.
so, it needs to be Admin right? In the default migration, there is role field which I think defines the authorization. The default role is Basic and I can't see the Admin policy created for that
Yeah, there is no migration for that. For now, you can manually set in database.
@reorg-hhasibul : no, I pointed out the policy for Admin. there's no Admin policy created in this package. so we can do nothing, other than index and store methods
@reorg-hhasibul : Thank you so much. I don't see there's isAdmin method. Thank you again
No problem. Wish you good luck.
Closed #58
I've got the response ("Insufficient privileges to perform this action") towards the api_token when try to register or login. i don't know what went wrong register method: https://pastebin.com/Wn2YVTKs login method: https://pastebin.com/bCDScg7B I've had:
Note: UserController@store hasn't tested yet
Update: when I comment the this->authorize() for each given methods, it works. means there's something wrong in the policy. what should I do next?