Get the latest tech news
You're protecting your data wrong – Introducing the Protected Query Pattern
Kilpi is an modern open-source authorization framework for TypeScript applications.
This problem seems simple initially, but may quickly grow into a difficult beast to maintain and understand in real production applications with complex and ever changing requirements. Every time you call getDocument(), you also have to duplicate the authorization logic, which makes maintenance error prone and developer mistakes more likely. This article is based on real problems and solutions I’ve encountered in countless industrial production projects over the years.
Or read this on Hacker News