gbtami / pychess-variants

Chess variant server
https://www.pychess.org
GNU Affero General Public License v3.0
226 stars 112 forks source link

Feature Request - Kid Mode & Parental Control #493

Open visualdenniss opened 3 years ago

visualdenniss commented 3 years ago

I'd suggest adding a kid mode option as a parental control tool as in lichess:

Screenshot 2021-04-20 at 10 53 09 1

The main advantage of this over the manual unchecking of the little green box in the corner of public chat area is that the kid would have not any manual access to chat, when he/she is using the site alone at that particular moment. If the account was created by parent/coach etc and kid doesn't know the password, this option would ensure the kid cannot have access to public chat without being under surveillance.

ghost commented 3 years ago

Coding this would be pretty simple. I guess? Just remove the source code of the chat. Isn't it?

gbtami commented 3 years ago

This is not so trivial, because pychess doesn't store user passwords at all.

ghost commented 3 years ago

@gbtami But isn't this possible without password? Lidraughts manages to do this without asking for password. Screenshot_20210420-145245_Samsung Internet

gbtami commented 3 years ago

Without password how you prevent kids to turn it off?

ghost commented 3 years ago

@gbtami Maybe by eliminating the [DISABLE KID MODE] button. Enabling kid mode once should permanently prevent that account from turning it off, then there won't be any risk of kids to turn it off. And for doing this all password isn't required! :D

pepellou commented 2 years ago

One idea to implement it without password would be to read the setting from lichess.

I haven't tried it, but the API offers it for the logged in user: https://lichess.org/api#operation/accountKid

If we do it on login, for instance, we could detect it and offer the site in that mode. For the user to turn it off, they would need to turn it off on lichess and log out + log in on pychess.