This lab implements Role-Based Access Control (RBAC) for Pine Valley Furniture web interfaces built in previous labs. The solution defines role metadata in the database, authenticates users by role, and enforces page-level access controls.
The RBAC schema is implemented in rbac_schema.sql with the following changes:
admin, staff, and customer.Role_Id and Customer_Id columns.Users.Role_Id -> ROLE_t.Role_Id and Users.Customer_Id -> CUSTOMER_t.Customer_Id.User_Role values are mapped to Role_Id for compatibility.The following interfaces were updated to enforce RBAC behavior:
ROLE_t.Customer_Id; staff/admin can select any customer.admin, staff, customer).RBAC test cases are documented in rbac_test_cases.md. They verify:
This implementation delivers a repeatable RBAC setup with database-level role modeling, secure login handling, and interface-level authorization checks for key workflows.