Home › Interview Questions › How did you control who could read what on your si…

How did you control who could read what on your site, and what was that system called?

🟡 Medium Conceptual Mid level
1Times asked
Sep 2026Last seen
Sep 2026First seen

💡 Model Answer

On our platform we implemented a fine‑grained role‑based access control (RBAC) system. Each user was assigned one or more roles (e.g., Viewer, Editor, Admin) and each role had a set of permissions that mapped to specific resources or actions. We stored the role‑permission mapping in a dedicated permissions table and used a middleware layer to intercept every read request. The middleware checked the user’s JWT token, extracted the roles, and looked up the allowed actions in the permissions table. If the action was not permitted, the request was denied with a 403 response. We called this system “Permission Matrix” in our documentation, but internally we referred to it as the “Access Control Layer.” This approach allowed us to change permissions without redeploying code, and it integrated cleanly with our audit logging to track who accessed what.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers on a discreet on-screen overlay.

Get Assisting AI — Starts at ₹500