Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javalab: Disallow user file names that are the same as validation file names #45569

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

sanchitmalhotra126
Copy link
Contributor

This change has Javalab always send the validation file names if they exist so that we can prevent naming collisions. The logic in Javalab was already in place, but previously we were only sending validation in start mode.

Note: one thing here - levels_controller sets validation in the level view options, which seems to guarantee that the validation field in the level config has the actual validation code and not just the file names. However, I'm not 100% if this is always guaranteed. From my testing, it seemed to be consistent, but let me know if there's a safer way to ensure that we're not overwriting the validation code in start mode with just the file names.

JIRA: https://codedotorg.atlassian.net/browse/JAVA-507

Links

Testing story

Tested on Javalab All The Things 12 - ensured that in both standard mode and start mode I couldn't create or rename files to be the same as existing validation files.

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@sanchitmalhotra126 sanchitmalhotra126 requested a review from a team March 30, 2022 19:24
Copy link
Contributor

@molly-moen molly-moen left a comment

Choose a reason for hiding this comment

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

LGTM! So long as we can see the validation files in start mode we should be good here.

@sanchitmalhotra126 sanchitmalhotra126 merged commit b295670 into staging Mar 30, 2022
@sanchitmalhotra126 sanchitmalhotra126 deleted the sanchit/javalab-validation-naming branch March 30, 2022 21:25
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.

None yet

2 participants