Lab 06: Code Implementation Report

Back to Lab 06 Dashboard


1. Introduction

This lab involves implementing a Role-Based Access Control (RBAC) mechanism for the Pine Valley Furniture Company. The goal is to enhance the existing database schema to include authentication details and user roles, and update previous web forms to conditionally grant access based on whether the logged-in user is an administrator or a regular customer.

2. Implementation Details

The project consists of the following ASP.NET Web Forms:

3. Design Decisions & Security Fixes

The application employs robust session testing (e.g., verifying `Session("User_Role") = "admin"`) across `Page_Load` events to limit components like administrative panels. Database queries were restructured to use correct configurations (via `Web.config`) and parameterized SQL Commands correctly aligned with the `Users` table schema, thereby completely resolving previous build errors, null exception drops, and credential bypass issues.