omar-dulaimi / trpc-shield

🛡 A tRPC tool to ease the creation of permission layer.
MIT License
402 stars 10 forks source link

Fix #17 - Only apply rule if the namespace is the proper one #18

Closed enrique-fernandez-polo closed 1 year ago

enrique-fernandez-polo commented 1 year ago

This code uses the opWithPath variable to get the namespace, assuming it's the first item in the array.

enrique-fernandez-polo commented 1 year ago

I wrote this code in GitHub without an IDE. I hope it helps 😂

omar-dulaimi commented 1 year ago

Closing in favor of #19

Released in https://github.com/omar-dulaimi/trpc-shield/releases/tag/0.4.3