Role-based access control (RBAC) is a security approach that uses roles to define what a user is and isn’t allowed to do. In an RBAC system, users are assigned roles with varying permissions for different resources, including files, databases, and applications.
So, when a user tries to access a resource, the system will first find the roles associated with the user and then check if any of the roles have the appropriate permission. If so, the user is allowed to access the resource. If not, the user is denied access.