docs(plan): GAP A capability taxonomy + 3-state permission model - #490
Merged
Conversation
Planning document for review (refs #488, #489). Captures the ratified capability naming standard, the not-see/see/see-and-edit model, the full rename map (single 'appointments' domain), the eight new view caps, and the per-surface 3-state gates for certificates, custom fields and recruitment settings. https://claude.ai/code/session_015oyFHBoKYyRez9F3ARZjvD
Establishes the plugin-wide capability naming standard (ffc_<action>_[own_] <domain>[_<qualifier>]) and the 3-state permission model, per #488. - Rename 10 caps to the standard (single 'appointments' domain). The ffc_view_self_scheduling -> ffc_view_own_appointments pair reverses the 4.5.0 rename migration, so it ships under a new option flag. - Add 8 read-only 'view' caps (the *só vê* tier): ffc_view_certificates, _appointments, _audiences, _reregistration, _custom_fields, _settings, _recruitment_settings, _recruitment_reasons. Total 26 -> 34 caps. - CapabilityCatalog updated (invariant all_slugs() == get_all_capabilities() preserved); CLAUDE.md documents the standard + gate rules. - One-shot migration (CapabilityManager::migrate_taxonomy_renames + Loader::ensure_taxonomy_renamed) rewrites grants on every user and role; admin caps version bumped v2 -> v3 so the new view caps reach the administrator role. ffc_operator gains the admin view caps. - phpcs custom_capabilities allowlist updated. Breaking: external integrations referencing the old slugs must update. https://claude.ai/code/session_015oyFHBoKYyRez9F3ARZjvD
- phpcbf realignment of the catalog arrays after the slug renames (the WPCS 'Array double arrow not aligned' failure on the previous push). - Each FFC manage role now also carries its matching view cap so the admin menu/tab (gated by a single view-cap string) stays visible to managers; inline write gates still require the manage cap. https://claude.ai/code/session_015oyFHBoKYyRez9F3ARZjvD
Certificates: - Submissions menu + Certificates Dashboard gated by ffc_view_certificates; trash/restore/delete (single + bulk + AJAX) require ffc_manage_certificates; the per-record Edit link requires ffc_edit_certificates. Row/bulk write actions are hidden from read-only viewers. Custom fields: - Audience custom-field save/delete/replicate AJAX gated by ffc_manage_custom_fields; the editor section renders read-only (no add/save controls) for ffc_view_custom_fields-only users. Recruitment settings: - Settings tab governed by ffc_view_recruitment_settings (see, read-only) and ffc_manage_recruitment_settings (edit); the latter is also wired as the options.php capability for the recruitment option group, so a Recruitment Manager operates the module while only a Recruitment Admin configures it. The tab is hidden without the view cap and the form is a disabled fieldset (no submit) for read-only viewers. Roles: ffc_recruitment_admin gains the recruitment view caps; manage roles carry their matching view cap so menus/tabs stay visible. Tests: taxonomy_cap_renames map + migrate_taxonomy_renames coverage. CHANGELOG: breaking-change banner for the renames + the newly-enforced caps. https://claude.ai/code/session_015oyFHBoKYyRez9F3ARZjvD
The dashboard CAPABILITY const moved from edit_others_posts to ffc_view_certificates (3-state gating); the test's hardcoded expectations follow. https://claude.ai/code/session_015oyFHBoKYyRez9F3ARZjvD
rpgmem
marked this pull request as ready for review
June 4, 2026 21:12
This was referenced Jun 4, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
O que
Documento de planejamento (só doc, para revisão) do GAP A da issue #488: padronização da taxonomia de capabilities + modelo de permissão de 3 estados (não vê / só vê / vê e edita, com admin WP por cima).
Arquivo:
docs/plans/gap-a-capability-taxonomy.md.Decisões já travadas com o mantenedor
ffc_<ação>_[own_]<domínio>[_<qualificador>](view/manage/export/import/edit/delete + especiais).appointmentspara o auto-agendamento (o eixo público/privado é o flagscheduling_visibilitypor calendário, não capability).Por que doc primeiro
A pedido do mantenedor: revisar o plano antes de escrever código (PR de implementação é grande e tem breaking-change pelos renames).
Escopo da implementação (resumo, ver doc)
CLAUDE.md+ registro/catálogo + migração de dados (user_meta + roles) — ⚠ rename Claude/fix migration cleanup xl j4 p #2 reverte a migração 4.5.0 (nova option-key).ffc_operatorganha as view novas; defs migradas).Relacionado
#488 (gaps + padrão) · #489 (visibilidade) · #482 / #486 / #487.
Este PR não deve auto-mergear — é para revisão do plano.
https://claude.ai/code/session_015oyFHBoKYyRez9F3ARZjvD
Generated by Claude Code