Repository navigation
Keep user flags in migration 0268 when an installed app manages the role tables - #16103
Merged
Maffooch merged 1 commit intoSep 28, 2026
Merged
Conversation
…anaged The 0268 backfill translates global roles into is_superuser / is_staff for installs that move to the authorized_users model. When an installed app still manages the role tables, the roles keep applying there, so the translation is skipped and the flags stay as they were. Open source only installs are unaffected: nothing else manages those tables, and the backfill runs as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This pull request modifies a sensitive database migration file that was changed by an author not included in the allowed list. Although the severity is low and the finding is non-blocking, it indicates a potential policy violation regarding code ownership.
Configured Sensitive Codepath Modified by Non-Allowed Author in
|
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/db_migrations/0268_release_authorization_to_pro.py' matches configured sensitive codepath pattern 'dojo/db_migrations/*.py' and was modified by '' (commit 400ec6d) who is not in the allowed authors list. |
Comment to provide feedback on these findings.
Report false positive: @dryrunsecurity fp [FINDING ID] [FEEDBACK]
Report low-impact: @dryrunsecurity nit [FINDING ID] [FEEDBACK]
Example: @dryrunsecurity fp drs_90eda195 This code is not user-facing
All finding details can be found in the DryRun Security Dashboard.
blakeaowens
approved these changes
Sep 28, 2026
Maffooch
approved these changes
Sep 28, 2026
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.
Description
Migration
0268_release_authorization_to_probackfills the legacyauthorized_usersrelations from the role tables, and derives user flags from global roles, for installs that move to theauthorized_usersmodel.When an installed app other than
dojostill manages the role tables, the global roles keep applying on that install, so there is nothing to translate them into. In that case the migration now leaves the user flags as they are. It reads this from the app registry: a managed model outsidedojowhose table isdojo_global_role. Theauthorized_usersbackfill is unchanged. Installs where nothing else manages those tables run the migration exactly as before.Test results
unittests/test_release_authorization_backfill.py. It runs the backfill against the migration state just before itsRunPythonstep, once with the role tables released (a global Owner and a global Writer get their flags, as before) and once with an installed app keeping them (the flags are unchanged). Both pass locally.ruff check(0.16.5, repo config) passes on the changed files.Documentation
No documentation change needed.
🤖 Generated with Claude Code