Skip to content

fix(track-chairs): let summit admins manage team selection lists - #678

Merged
smarcet merged 1 commit into
mainfrom
fix/summit-admins-team-lists
Nov 17, 2026
Merged

smarcet merged 1 commit into
mainfrom
fix/summit-admins-team-lists

Conversation

@smarcet

@smarcet smarcet commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

ref: https://app.clickup.com/t/1k5eh578fhf

Summit admins can now use summit-admin's Track Chairs > Team Lists page. Before this change it returned "user not authorized" for them.

Problem

The page calls three endpoints:

  • GET /api/v1/summits/{id}/selection-plans/{selection_plan_id}/tracks/{track_id}/selection-lists/team
  • POST /api/v1/summits/{id}/selection-plans/{selection_plan_id}/tracks/{track_id}/selection-lists/team
  • PUT /api/v1/summits/{id}/selection-plans/{selection_plan_id}/tracks/{track_id}/selection-lists/{list_id}/reorder

Their auth.user authz groups were super-admins, administrators, track-chairs and track-chairs-admins. UserAuthEndpoint returned 403 to a summit admin (summit-front-end-administrators) before the controller ran. The service check behind them, Summit::isTrackChair(), already accepts a summit admin of that summit (isSummitAdmin(): the summit admins group plus the summit's permission group), so the middleware was the only thing blocking them.

Changes

  • database/migrations/config/Version20261117120000.php: adds summit-front-end-administrators to get-team-selection-list, add-team-selection-list and reorder-selection-list. It is idempotent, and down() removes the group again.
  • ApiEndpointsSeeder: the same three endpoints get the group, for fresh installs.
  • OAuth2SummitSelectedPresentationListApiController: the OpenAPI authz_groups of the three operations now list the group.

Per-summit scoping does not change. A summit admin who is not in the summit's permission group still gets a 403 from the service.

The individual selection-list endpoints are not changed. Team Lists does not use them.

Deployment

  • Run the config migrations.

  • Flush the cache after deploy. UserAuthEndpoint caches the groups for each route and method, and the allow/deny result for each member, with no TTL. Until the cache is flushed, summit admins who already got a 403 keep getting it.

    Delete only the UserAuthEndpoint keys, from any one pod (all pods share the same Redis):

    kubectl exec -n <namespace> deploy/<summit-api-deployment> -- php artisan tinker --execute='
    $r = Illuminate\Support\Facades\Redis::connection("cache");
    $c = "0"; $n = 0;
    do {
      [$c, $keys] = $r->scan($c, ["match" => "laraveluser_auth_endpoint_*", "count" => 1000]);
      if ($keys) { $n += $r->del(...$keys); }
    } while ($c != "0");
    echo "deleted $n\n";'
    • The cache prefix is laravel with no separator, so the keys are laraveluser_auth_endpoint_<route>_<method> (the endpoint's groups) and laraveluser_auth_endpoint_<route>_<method>_<member_id> (each member's result). The pattern deletes both.
    • SCAN walks the keys in batches. KEYS would block Valkey while it scans the whole DB.
    • Use the fully qualified facade. In tinker, the short Redis:: alias resolves to the phpredis extension class and fails with Call to undefined method Redis::connection().
    • Do not use php artisan cache:clear. The cache store uses Redis DB 0, which the default connection also uses, and cache:clear runs FLUSHDB on it. That also drops cached access tokens, cached API responses, locks and rate limits.

Tests

New tests/oauth2/OAuth2SummitSelectedPresentationListSummitAdminApiTest.php, run by the OAuth2Tests job. The identity is in the summit admins group and is not a global admin or a track chair. The token stub carries no admin IdP groups.

  • testSummitAdminCanCreateGetAndReorderTeamSelectionList: a summit admin of the summit creates the team list (201), gets it (200) and reorders it (201). On main the create returns 403.
  • testSummitAdminOfAnotherSummitCannotGetTeamSelectionList: without the summit's permission group, the GET still returns 403.

tests/oauth2/OAuth2SummitSelectedPresentationListApiTest.php and tests/SummitSelectedPresentationListServiceTest.php still pass. The migration was also run down and up against the local config DB: 3 → 0 → 3 rows, and a second up leaves 3.

docker exec summit-api bash -lc "cd /var/www && vendor/bin/phpunit tests/oauth2/OAuth2SummitSelectedPresentationListSummitAdminApiTest.php"

The auth.user authz groups for the team selection list endpoints (GET/POST
selection-lists/team and PUT selection-lists/{list_id}/reorder) did not
include summit administrators, so summit-admin's Team Lists page returned
403 for them even though Summit::isTrackChair already allows a summit
admin of that summit.

Add SummitAdministrators to those endpoints in ApiEndpointsSeeder, the
OpenAPI authz_groups, and a config migration for deployed environments.
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e8b48df8-83a9-4aff-99ca-1428d725c76d
Commits

Reviewing files that changed from the base of the PR and between 4523ba0 and e55a284.

Files selected for processing: 4

  • app/Http/Controllers/Apis/Protected/Summit/OAuth2SummitSelectedPresentationListApiController.php
  • database/migrations/config/Version20261117120000.php
  • database/seeders/ApiEndpointsSeeder.php
  • tests/oauth2/OAuth2SummitSelectedPresentationListSummitAdminApiTest.php
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown

📘 OpenAPI / Swagger preview

➡️ https://OpenStackweb.github.io/summit-api/openapi/pr-678/

This page is automatically updated on each push to this PR.

@smarcet smarcet self-assigned this Nov 17, 2026
@smarcet
smarcet requested a balanced review from Copilot November 17, 2026 17:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the summit-administrator team-list access change.

No open issues 🎉

What changed in this PR

Enables summit administrators to use summit-admin’s Track Chairs > Team Lists page by admitting them through endpoint authorization while preserving existing summit-specific permission checks.

Changes:

  • Adds the summit-administrator group to team-list GET, POST, and selection-list reorder authorization through a reversible migration and fresh-install seed data.
  • Updates OpenAPI authorization metadata for the three operations.
  • Adds API tests covering authorized create/get/reorder requests and denied GET access without the summit’s permission group.
File Description
tests/​oauth2/​OAuth2SummitSelectedPresentationListSummitAdminApiTest.php Adds summit-admin access and summit-scoping regression tests.
database/​seeders/​ApiEndpointsSeeder.php Grants the endpoint group access on fresh installs.
database/​migrations/​config/​Version20261117120000.php Adds an idempotent authorization migration with rollback support.
app/​Http/​Controllers/​Apis/​Protected/​Summit/​OAuth2SummitSelectedPresentationListApiController.php Documents summit-admin access in OpenAPI metadata.

Review effort: Balanced

@romanetar
romanetar self-requested a review November 17, 2026 18:01

@romanetar romanetar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@smarcet
smarcet merged commit d8c0633 into main Nov 17, 2026
40 checks passed
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.

3 participants