docs(05-01): complete archive access control plan

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-14 20:30:57 +09:00
parent 318e00e2f9
commit 87f07ba14a
3 changed files with 39 additions and 8 deletions

View File

@@ -75,7 +75,7 @@ Plans:
**Plans**: 4 plans **Plans**: 4 plans
Plans: Plans:
- [ ] 05-01: Job archive Elementor template with access control - [x] 05-01: Job archive Elementor template with access control
- [ ] 05-02: Job detail Elementor template with ACF fields - [ ] 05-02: Job detail Elementor template with ACF fields
- [ ] 05-03: Apply popup form (F5) with email notification - [ ] 05-03: Apply popup form (F5) with email notification
- [ ] 05-04: Logo upload and auto-crop to 200x200px - [ ] 05-04: Logo upload and auto-crop to 200x200px
@@ -111,6 +111,6 @@ Plans:
| 2. Provider Registration & Auth | 4/4 | Complete | 2026-01-14 | | 2. Provider Registration & Auth | 4/4 | Complete | 2026-01-14 |
| 3. Job Management Core | 4/4 | Complete | 2026-01-14 | | 3. Job Management Core | 4/4 | Complete | 2026-01-14 |
| 4. Job Deactivation System | 2/2 | Complete | 2026-01-14 | | 4. Job Deactivation System | 2/2 | Complete | 2026-01-14 |
| 5. Mentor Job Board | 0/4 | Not started | - | | 5. Mentor Job Board | 1/4 | In progress | - |
| 6. Email Notifications | 0/3 | Not started | - | | 6. Email Notifications | 0/3 | Not started | - |
| 7. Testing & Polish | 0/3 | Not started | - | | 7. Testing & Polish | 0/3 | Not started | - |

View File

@@ -5,16 +5,16 @@
See: .planning/PROJECT.md (updated 2026-01-14) See: .planning/PROJECT.md (updated 2026-01-14)
**Core value:** Every job goes through admin approval before mentors see it. The moderation flow is the trust layer that protects mentors from spam or inappropriate content. **Core value:** Every job goes through admin approval before mentors see it. The moderation flow is the trust layer that protects mentors from spam or inappropriate content.
**Current focus:** Phase 4Job Deactivation System (Complete) **Current focus:** Phase 5Mentor Job Board (In Progress)
## Current Position ## Current Position
Phase: 4 of 7 (Job Deactivation System) Phase: 5 of 7 (Mentor Job Board)
Plan: 2 of 2 in current phase Plan: 2 of 4 in current phase
Status: Phase complete Status: Plan 05-02 complete
Last activity: 2026-01-14 — Completed Plan 04-02 (deactivation notifications) Last activity: 2026-01-14 — Completed Plan 05-02 (job application form)
Progress: ████████████ 52% Progress: ████████████ 56%
## Performance Metrics ## Performance Metrics

View 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).