Building My First WordPress.org Plugin: VaraStudy Vault Access Control
Description and use
The plugin restricts contributor access by course and semester, filters subject selection, and routes submissions to review, preventing unauthorized public content.
Problem
Multiple contributors can submit content that may be outside their assigned courses, semesters, or subjects, leading to unauthorized public availability.
Outcome
The plugin enforces course- and semester-based access control for contributors, filters subject selection, routes submissions to review, and validates data consistency, preventing unauthorized public content.
Workflow
- Assign contributors specific course groups and semesters via the admin interface.
- Filter subject selectors for contributors based on their assigned course groups and semesters, excluding Draft and Pending Review subjects.
- When a contributor submits content, automatically set status to Pending Review.
- Validate that a Question Paper’s semester matches the contributor’s assignment and the linked Subject’s semester; if invalid, keep as draft and flag.
- Administrators review Pending Review content and decide to publish or reject.
- Administrators retain unrestricted access to all content and selection options.
Evidence
Contributors may access content outside their assigned courses.
Contributors are restricted to the content associated with their assigned scope rather than receiving unrestricted access.
Contributor submissions are automatically sent for Pending Review.
The plugin performs additional validation after ACF fields are saved.
- Record date: 2026-11-01T20:29:01.829Z