Repository navigation
validate users with input types in shared.db - #318
Merged
Merged
Conversation
- `NewUser` and `UserUpdate` replace the cleaning on the admin page - emails are stored and looked up stripped and lower-cased - `set_status` rejects the current and unknown statuses - the initials and email uniqueness checks query the backend - the form limits are read from the input type Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- `NewProject` replaces the project id check of the projects page, the id rule is one regex - a project needs an active owner, if one is given - only active projects can be archived or deleted - the form limits are read from the input type Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…k in shared - `check_config_params` is the one check of unresolved `config_params`, used by the settings page and at job time; its helpers are private - move the runner check to shared/runner_checks.py, it also rejects an unknown runner - remove the unused `allow_absolute_paths` of `check_for_malicious_content` Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- `NewSettings` replaces the validation on submit of the settings page - `settings.create` checks the runner and the owner, reports all rule errors together and archives the previous version itself (`archive_previous`) - only active settings can be archived or deleted - the form limits are read from the input type - remove `empty_to_none` of the webapp, the input types do it Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- `NewAssignment` validates scopes and file name filters - `assign`, `unassign` and `update_to_latest` take `allow_fallback`: the caller states whether it may change the assignments of the fallback project - `assign` reports all rule errors together - `update_to_latest` points the assignment to the latest version in one write - `known_scopes` is the one list of scopes, also for the form Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- unknown scopes: neither the default scope, a vendor nor an instrument of the yaml - scopes whose instruments are all excluded - the default scope excluded, a scope both included and excluded - file name filters that always match an exclude filter `update_to_latest` does not re-check the stored scopes and filters. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A scope or file name filter that would never apply is rejected even if other entries of the assignment still apply. Messages and docstrings said "they would never apply", which read as the whole assignment. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`fully_excluded_scopes` already rejects an excluded default scope and a scope that is both included and excluded, for every scope with an instrument in the yaml. Remove the two rules from `NewAssignment`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A scope in both `scopes` and `excluded_scopes` was listed twice. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`get_instrument_types` in shared/yamlsettings.py replaces the separate reads in the scope resolver and the projects, overview and admin pages. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
`KNOWN_VENDOR_NAMES` becomes `KNOWN_INSTRUMENT_TYPES`; comments, docstrings, test names, an error message and the texts of the projects page follow. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The page only knows the active versions, so "current + 1" was wrong whenever a newer version was archived or deleted. Add a test that the archive checkbox names the version `settings.create` archives, the latest active one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…arams The gap is in that check, which every client and the processor run. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The field declares the lengths, the regex only the characters. A too short id now gets the length message, like a too long one. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Project.id and User.initials mixed a constant with a literal. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Only the projects page left it out; other clients could archive or delete it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The toasts no longer repeat the entered text; the bulk add report names the initials of the stored users. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refactor validation2 ix
reject settings assignments that can never apply
validate settings assignments with an input type in shared.db
validate new settings with an input type in shared.db
prepare the settings validation: one config_params check, runner chec…
validate new projects with an input type in shared.db
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.
NewUserandUserUpdatereplace the cleaning on the admin pageset_statusrejects the current and unknown statuses