Hey guys,
I try to create a market place with Golang that source is available until now on GitHub: https://github.com/mehrdaddolatkhah/market-place
in this service, I have 3 roles: admin, user, and marketer.
now I want to create an Access Level list for this service. how I must do that?
right now my strategy is to create a layer in the rest package and then check the JWT token, that I place userId inside JWT token, and then check the end-point that the user called then check the database with that role, then if the user existed and have access to that end-point data return response. is it a good solution? or people how handle this?
thank you for your advice.
sorry for bad English. I start to learn English in academic and it takes a time to be better