# Feature: User Roles ## Overview Two custom WordPress user roles control access to all scheduling features. ## Roles ### Instructor (`us_instructor`) Created on plugin activation. Logs in via standard wp-admin. Can: - Manage their own availability slots (add/delete) - View their upcoming confirmed/pending lessons in wp-admin **Capabilities:** `read`, `manage_availability`, `view_own_lessons` ### Student (`us_student`) Logs in via the front-end `[us_student_login]` shortcode. Can: - Browse available lesson slots from all instructors - Book a lesson slot **Capabilities:** `read`, `book_lesson`, `view_own_lessons` ## Implementation - Class: `Unsupervised\Schedular\Roles\RoleManager` - Roles are created on `plugins_loaded → init` and on plugin activation via `Installer`. - Permissions are checked with `current_user_can()` against the capability string, not the role name. ## Tests - `tests/Unit/Roles/RoleManagerTest.php`