Translation note. This manual is a translation of the Portuguese original. The command-line tools (
moj,moj-contest,moj-comp) print their messages in Portuguese, and the command examples below are identical to the original.
A normal Free Training sign-up is confirmed through
Telegram. This excludes people who cannot have an
account on the messenger, typically minors. The
managed account solves this. A
responsible .admin creates it. It has no
link to Telegram. It has privacy locks that are removed
automatically at age 18.
| Normal account | MANAGED account (minor) | |
|---|---|---|
| Created via | web sign-up + Telegram | the π§ Managed accounts tab of
/treino/admin/ |
| Password | by bot DM | generated and shown ONCE to the admin |
| Forgot the password | /trocarsenha in the bot |
only the admin (π in the tab) |
| Public profile | optional (default public) | always private (the server refuses to make it public) |
| Telegram | optional | blocked |
| At 18 | β | the locks are removed automatically: the user can link Telegram and open the profile |
The mark is in the user's account.json:
"managed": { "by": "prof.admin", "note": "turma A, Escola X",
"birthdate": "2011-03-14", "expires_at": null, "created_at": 1785000000 }The system calculates minor from the birthdate on
each access. Nothing is "switched" at 18; the gates simply stop
applying. The managed mark stays (for history and listing,
with the 18+ badge). The profile stays private until the
user opens it.
profile_is_public blocks this on the server. The account
does not appear in the home page "Top 10" or in "Recently solved". Other
users see the profile as the π lock (the same rule as a common private
profile);POST /treino/telegram/link-start returns 403
managed_minor.expires_at
is in the past, login returns 403 account_expired. The
message is in Portuguese:
Conta expirada β fale com o responsΓ‘vel que a criou
(account expired β talk to the person responsible who created it). To
renew, edit or clear the date in the tab./treino/admin/)nome.sobrenome, with dedup), free-text note,
and optional expiration.Nome Completo;AAAA-MM-DD, with a common note and
expiration. The screen shows this model in the interface language
(Full Name;YYYY-MM-DD). This is ideal for a class./contest/badges refuses contest=treino on
purpose, so that it does not dump the whole user base in clear
text.).removed-users/; submissions are kept).managed-create/reset/update/remove go to the audit log with
the admin who did the action (π Activity tab)..admin Bearer)| Route | Use |
|---|---|
GET /treino/admin/managed-users |
lists
{login,fullname,by,note,birthdate,minor,expires_at,disabled} |
POST /treino/admin/managed-create |
{users:[{fullname,birthdate,login?,note?,expires_at?}]}
(1..500) β {created:[{login,password,β¦}], skipped} |
POST /treino/admin/managed-reset |
{login} β new password (once) |
POST /treino/admin/managed-update |
{login, note?, birthdate?, expires_at?|null, disabled?} |
POST /treino/admin/managed-remove |
{login} |
account.json (the standard model
of the platform). It travels only in the create/reset response.managed_json / is_managed_minor
in server/api/v1/lib/profile.sh.
is_managed_minor is the gate that
profile_is_public, the POST of
/treino/profile, and link-start use. An
unreadable date is treated as a minor (fail-safe).web/treino/perfil/perfil.js) hides the
Telegram link and locks the privacy checkbox when
GET /treino/profile returns
managed.minor:true.POST /contest/admin/users-set-password refuses
contest=treino (one POST would reset all the
accounts of the platform).MANUAL-TREINO.md β the
student manual (normal sign-up, login).PERFIL.md β the public
profile and the achievements.API.md β full contracts of
the routes.