Repository navigation
Add an admin section with three access levels - #13163
Merged
Merged
Conversation
Add a maintainer_admin role between admin and maintainer. Each level now implies the ones below it. The staff role becomes a label only and no longer gives access to anything. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the existing rule for inactive tracks. maintainer? now covers maintainer admins and admins, so the separate admin check goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every page at /admin now shares one layout. The sidebar lists the pages the current user can see, grouped under Admin, Maintainer admin and Maintainer, and the /admin front page shows the same groups as cards. The maintaining pages move into /admin. The old /maintaining URLs redirect to their new ones. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The selected item's accent border sits on its start edge. Without rounded corners on that side, the accent is a straight line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Take out the donors and Insiders pages, their routes, tests and their entries in the admin sidebar and front page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…legend below the table Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le exercise list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Maintainer admins can now add a track from /admin/tracks/new by entering its slug. The page checks the slug, queues Track::Create in Sidekiq, and lists the most recently added tracks so it's clear when the new one has been created. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…jobs don't count Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iHiD
force-pushed
the
admin-access-levels
branch
from
November 26, 2026 07:52
a82a08a to
8347753
Compare
…parse Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Admins can now see everyone with a role at /admin/roles, filter the list by role, and give or take away each role. The page uses User::AddRoles and User::RemoveRoles, so Discord, Insiders and analytics are updated as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Role tags, the role select and the messages now use the same names as
the filter ("Maintainer admin"). The add-a-role column has a fixed width,
so the select is the same size on every row and the button stays inside
the table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A form above the roles table takes a handle and a role, so an admin can give a role to someone who isn't in the table yet. If no user has the handle, the page says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
This PR gives the website one admin section at
/admin, so that jobs which needed a Rails console (adding a track, changing someone's roles) can be done from the site. Everyone with access uses the same section, and each person sees the pages their level allows.Access levels
Access now comes in three levels, highest first. Each level can do everything the levels below it can.
The
staffrole now only marks a person as staff. It still gives the "Exercism Staff" profile tag, the staff flair, lifetime Insiders andis_internalin analytics. It gives no access to any page. Verbose query logging is for admins, and the exception for one named user is removed.The admin section
/adminshows the same groups as cards. Anyone below maintainer is sent to the home page./admin. Old/maintaining/...links (with or without a locale) redirect with a 301 to the same page under/admin/....Track::CLIENT_SIDE_TEST_RUNNER_SLUGS), a searchable exercise list and an Open button. Its URL is now/admin/experimental_editors/:track_slug/:exercise_slug.New pages
/admin/tracks/new, maintainer admin). It takes a slug, checks its format and that no track has it yet, and queuesTrack::Create. The page lists the five most recently added tracks, so it's clear when the new one has been created./admin/roles, admin). It lists everyone with a role, with a filter by role. An admin can add or remove a role on each row, or give a role to someone new by handle. It usesUser::AddRolesandUser::RemoveRoles, so Discord roles, Insiders status and analytics update as they do for other role changes. An admin can't remove their own admin role.Risks
staffrole will lose access to the admin pages, the automation pages on every track and mentoring, along with the maintainer and supermentor roles on Discord and the "Maintainer" profile tag. Before this is deployed, someone needs to give themmaintainer_adminoradmin, or do it on the Roles page straight after.supermentorrole will lose the supermentor Discord role.maintainer_adminuntil it is given on the Roles page.exercism/<slug>exists on GitHub. If the repo is missing, the job will fail and retry in Sidekiq. If the track'sconfig.jsonmarks it as active, it will go live as soon as the job finishes.🤖 Generated with Claude Code