Back to feed
Dev.to
Dev.to
7/11/2026
I built a tiny permission-checking library because our backend's permission strings never matched what the UI expected

I built a tiny permission-checking library because our backend's permission strings never matched what the UI expected

Short summary

A developer built 'permission-access', a tiny zero-dependency JS library that lets UIs ask semantic permission questions ("can they read Orders?") without hardcoding backend endpoint names. It supports optional action maps to bridge naming conventions, React provider/Can components, and convenience wrappers like canRead/canCreate. The author is transparent that it's v0.1.x, not battle-tested, and recommends accessly for more complex needs like wildcards or explainable denials.

  • permission-access is a zero-dependency, framework-agnostic JS permission checker
  • Solves the mismatch between backend endpoint-named permissions and semantic UI checks
  • Transparently positioned as a small v0.1.x library, not a replacement for fuller solutions

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more