nest-rest-mongo-boilerplate
nest-rest-mongo-boilerplate copied to clipboard
Implementation of roles using nest-access-control
First of all, nice library you have made here. I really appreciate your work.
I have a question regarding the implementation of roles using nest-access-control.
Your implementation currently seems to grant permission to "edit" and "delete" profile to all users (at least that is what happens when I try to run it).
I had much difficulty in finding good documentations of nest-access-control. So, my question is why is it that you attached ACGuard in the "delete" endpoint for profile and not in the "patch" endpoint? And is granting permission to all users intended in this particular boilerplate?
Hey @diffunity I'm currently in the progress of refactoring this boilerplate to not have nest-access-control in it. But utilize nest guards to act as authorization middleware.
I think when I built it, to have the CI/CD work and delete the user that was created I needed that delete permission to be there.
Some changes as mentioned - https://github.com/msanvarov/nest-rest-mongo-boilerplate/issues/1242 uses CASL for its authorization.