Assigning Roles to Users
Access control—who can access what—is a massive topic. Systems to control access to data can range from the simple (users can perform actions based on a single role) to the more complex (users can be assigned roles in one or more groups, each with its own permissions) to the extremely fine-grained (users can be granted specific permissions per piece of data, on top of everything else).
What level of access control you need heavily depends on the app you’re building, and it may change over time. For Tunez, we don’t need anything complicated; we only want to make sure data doesn’t get vandalized, so we’ll implement a more simple system with roles.
Each user will have an assigned role that determines which actions they ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access