docs(05-01): complete archive access control plan
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
31
.planning/phases/05-mentor-job-board/05-01-SUMMARY.md
Normal file
31
.planning/phases/05-mentor-job-board/05-01-SUMMARY.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Phase 5 Plan 1: Archive Access Control Summary
|
||||
|
||||
**Protected job archive with Elementor-ready query configuration for mentor browsing**
|
||||
|
||||
## Accomplishments
|
||||
|
||||
- Job archive protected from public access (redirects to /anbieter-login/)
|
||||
- Query helper configured for Elementor templates to display published jobs sorted by date
|
||||
- All access control follows established template_redirect pattern from provider dashboard
|
||||
- Archive query modification ensures only published jobs shown with newest first ordering
|
||||
|
||||
## Files Created/Modified
|
||||
|
||||
- `includes/class-access-control.php` - Added protect_job_archive() method with template_redirect hook to redirect non-logged-in users from /jobangebote/ archive
|
||||
- `includes/class-archive.php` - New archive query helper class that modifies job_offer archive queries via pre_get_posts filter to show only published jobs sorted by date (DESC) with no pagination
|
||||
- `includes/class-ddhh-job-manager.php` - Registered DDHH_JM_Archive::setup_hooks() in init_hooks() following existing pattern
|
||||
- `ddhh-job-manager.php` - Added require_once for class-archive.php following established file loading pattern
|
||||
|
||||
## Decisions Made
|
||||
|
||||
- Used home_url('/anbieter-login/') for consistency with established login URL pattern
|
||||
- Set posts_per_page=-1 to show all published jobs (no pagination) for Elementor Loop Grid
|
||||
- Applied query modification only to main query on frontend to avoid affecting admin or secondary queries
|
||||
|
||||
## Issues Encountered
|
||||
|
||||
None
|
||||
|
||||
## Next Step
|
||||
|
||||
Ready for parallel execution with 05-02 and 05-03 (independent plans).
|
||||
Reference in New Issue
Block a user