Handle accounts managed by malcontent
Handle child accounts managed by the Parental Controls, by displaying a banner that lets the them know some settings cannot be changed, with a link to the Parental Controls application. The screen time limits controls also become insensitive, and the change is relevant only when libmalcontent library version includes the necessary functionality.
TODO:
-
monitoring for malcontent session-limits changes -
use malcontent as a meson subproject with wrap dependency system - [ ] make more information button insensitive when malcontent enabled as per discussion(will be done in a follow up)
Testing with latest malcontent:
You can build and install a systemd-sysext with latest malcontent for testing, calling following script from within malcontent checkout:
./tools/build-sysext.sh --source-dir .
Then you can use malcontent-client command line utility to manage session limits, optionally providing a username, by default operating on the current account:
malcontent-client get-session-limits [username]
malcontent-client set-session-limits [username] daily-limit --daily-limit 3600
malcontent-client set-session-limits [username] daily-schedule --start-time 08:00 --end-time 22:00
# Daily time limit: 1 hour, bedtime: 22:00
After setting any session limits with malcontent-client, the wellbeing panel should show the banner with a button opening the Parental Controls application open to the current user account, but if you're testing on an administrator account i.e. yourself, the user list will be showed instead, which is by design. To test opening the malcontent-control application, execute the malcontent-client commands on a non-adminstrator account, and switch to that user.
Moreover, the following screen time limit controls should become insensitive:
- Screen Limits section
For the controls to become sensitive again, disable parental control session limits with malcontent-client:
malcontent-client set-session-limits [username] none
The banner should disappear and the time limit controls should become sensitive
Fixes: #3514 (closed)