Skip to content

Facilitators see only profiles they can open on org pages and bookmarks - #2785

Merged
maebeale merged 8 commits into
mainfrom
maebeale/facilitator-profile-access
Oct 23, 2026
Merged

maebeale merged 8 commits into
mainfrom
maebeale/facilitator-profile-access

Conversation

@maebeale

@maebeale maebeale commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 small view/decorator logic on the org people list and personal bookmarks

Facilitators were clicking people on organization pages and bookmarks and landing on profiles they couldn't open, so those links now show only people they're allowed to see.

  • Org show people list — now "Facilitators": only active facilitators, for every viewer.
    • A card still lists the person's other active titles (e.g. Director).
    • Non-admins see only the ones they can open (allowed_to?(:show?)).
    • Admins see all of them; a blue lock in the card corner marks ones hidden from facilitators (they never see those cards).
  • My bookmarks "Created by" — plain name when the viewer can't open the creator's profile.
  • Preloads each person's affiliations on org show so the policy check doesn't N+1.
  • Author bylines got the same fix on main in Link stories to their workshop, organization, authors, and spotlight; open workshop-page stories in Story Share #2779.

🤖 Generated with Claude Code

@maebeale maebeale changed the title Only show openable active facilitators on org people list and author links Org people list and author links show only profiles you can open Oct 22, 2026
.sort_by { |a| [a.person.first_name.to_s.downcase, a.person.last_name.to_s.downcase] } %>
<% grouped = active_affiliations.group_by(&:person) %>
<h2 class="mb-3 font-display text-2xl text-gray-900">Facilitators</h2>
<% grouped = org_decorated.active_affiliations_by_facilitator.select { |person, _| allowed_to?(:show?, person) } %>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Admins now also see only active facilitators here — Director/Board Member-only people drop off this list (still on the edit page). Say if admins should keep seeing everyone.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 From Claude: Resolved — admins now see everyone again, with a lock on people facilitators can't open.

@maebeale maebeale changed the title Org people list and author links show only profiles you can open Org people list shows only active facilitators you can open Oct 23, 2026
@maebeale
maebeale force-pushed the maebeale/facilitator-profile-access branch from 5e3a4b3 to bdf0d58 Compare October 23, 2026 12:08
maebeale and others added 3 commits October 23, 2026 08:56
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Non-admins can open a profile only when it's searchable and the person is an
active facilitator, so the org people list and author bylines were sending
them to profiles that refused to load.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… policy

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@maebeale
maebeale force-pushed the maebeale/facilitator-profile-access branch from bdf0d58 to 4f90d22 Compare October 23, 2026 12:56
maebeale and others added 2 commits October 23, 2026 10:47
Only non-admins hit dead-end profile links, so the facilitator-only filter
applies to them; admins still need the full roster.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… creators

Admins see the full roster, so a lock tells them which profiles a facilitator
would hit a dead end on. The personal bookmarks creator button had the same
dead-end link the org list did.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@maebeale maebeale changed the title Org people list shows only active facilitators you can open Facilitators see only profiles they can open on org pages and bookmarks Oct 23, 2026
The 10px corner icon blended into the card border.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@maebeale
maebeale marked this pull request as ready for review October 23, 2026 15:16
maebeale and others added 2 commits October 23, 2026 11:17
The section is the org's facilitator roster for every viewer; the lock sits in
the card corner so it can't spill outside the grid.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@maebeale
maebeale merged commit 826ce87 into main Oct 23, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/facilitator-profile-access branch October 23, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant