Storing multiple user roles in a single column(TinyInt) to a database.

Role Based Access Control (RBAC): It is the developer's responsibility to ensure the security of web applications while developing it. Broken access control is one of the critical vulnerabilities in web applications. It allows users to access resources that are not supposed to be accessed by them. To learn more about this vulnerability click here . This vulnerability can be eliminated by implementing the right access control logic. One of the common and simple methods is Role-Based Access Control (RBAC). In this approach, we assign a user with specific roles. Each role will have specific resource access. I know most of the web developers will be aware of it. But I've seen many developers use strings to store roles in the database. Look at the below table, ( approach:1 ) id name role 1 tony stark admin 2 peter parker customer 3 bruce vendor 4 natasha romanof customer Some application need multiple user roles for single user, so t...