Skip to content

Hide the per-item credit preference field from non-admins once profiles are self-service #2261

Description

@maebeale

Interim state shipped in #2093.

Why the field is there now

Credits render from the credited person's profile (Person#display_name_preference plus anonymous_contributions). Facilitators cannot edit their own profilePersonPolicy#edit? and #update? are admin? — so the submission forms still collect a per-item credit preference as a way to record what the submitter wants.

That stored value does not drive display. It surfaces on /author_credit_divergences as a discrepancy, and an admin applies it to the person's profile so it covers everything they share. The edit forms already warn when a record diverges, linking to that page.

What to do here

Once facilitators can edit their own display preferences:

  • Hide author_credit_preference on the three submitter-facing idea forms (story_ideas, workshop_ideas, workshop_variation_ideas) unless allowed_to?(:manage?, ...) — the field lives in app/views/shared/_author_credit_status.html.erb
  • Drop :author_credit_preference from those three controllers' strong params, or keep it admin-only
  • Point submitters at their own profile instead — replace the "an admin applies it to your profile" copy in app/views/shared/_author_credit_preview.html.erb
  • Revisit whether the preference section of the divergences page is still needed, or only the three sections about a missing author_id

Related

  • Self-service profile editing is the blocker: PersonPolicy#edit? / #update? are admin-only, and person_params permits notes, filemaker_code, created_by_id and nested user_attributes[:inactive], so it needs its own narrow whitelist.
  • The per-item anonymous override is a separate legacy path the divergences page also drains.

🤖 From Claude: filed while shipping the interim step in #2093.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions