Remix.run Logo
tzs 12 hours ago

(This is a reply to the dead comment, which was not dead when I start writing this)

I don't know how long their specific proposal would take, but on a Unix or Unix-like system the California bill could be done in a week.

0. Make a directory somewhere, say /etc/age_check, and in that directory create four files: 0-13, 13-16, 16-18, 18+, owned by some system account with permissions 000.

1. This would be the hardest part. Modify whatever is used to interactively create new user accounts to ask for the user age if the account is a child's account, and than add an ACL entry for the appropriate /etc/age_check file that allows the child's account to read that file.

The California bill says you have to ask for and age or birthdate but the API you provide for apps to ask for age information just requires giving an age bracket, so I'm taking that as meaning I am not required to actually store the age. I only have to make the API work.

2. The API for checking age is to try to open the files in /etc/age_check. Whichever open succeeds gives you the user's age bracket.