Allow students under age 13 to view applab and gamelab projects #17579
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
Allow signed-in users under age 13 who do not have a teacher who has agreed to our terms of service agreement to view applab and gamelab projects which do not store data. Also add a few protections against these users creating any applab or gamelab app, or from accessing apps which use data. Also see project work item list doc.
Terminology
in all cases below, students who are under 13 are treated as over 13 if they have a teacher who has accepted the terms of service. A signed-in user who is under 13 and has no teacher (or the teacher has not accepted the terms of service) is "too young". This nomenclature is not great and I'm open to changing it. Alternatives:
recompute
isSignedIn && !is13Plus && !hasAcceptedTerms
in many places and assign them to individual names likecanStoreData
,canRemix
, etc.rename
isTooYoung
toisYoungWithoutTeacher
or something more descriptive.isTooYoung
must remain distinct fromis13Plus
, because some parts of the product will depend strictly on the user's actual age regardless of whether they have a teacher.Routing changes
Visible changes
A few buttons have been hidden for actions which are not allowed for young students.
before
after
There are also a couple of existing warning messages that weren't showing before and are now showing:
too young, with teacher, terms not accepted
too young, without teacher