This article describes how to disable Nextcloud access for legal guardians imported with the UCS@school user import.
Prerequisites
The legal guardians are imported using a dedicated UCS@school import configuration, for example legal_guardians.json.
Procedure
Add the UDM attribute nextcloudEnabled with the value 0 to the scheme section of the import configuration:
{
"csv": {
"delimiter": ";",
"header_lines": 1,
"mapping": {
"ID": "record_uid",
"Vorname": "firstname",
"Nachname": "lastname",
"Benutzername": "description"
}
},
"scheme": {
"nextcloudEnabled": "0"
}
}
The UCS@school importer supports arbitrary UDM attributes through scheme:<udm attribute name>. The attribute does not need to be part of csv:mapping.
When this configuration is used exclusively for legal guardians, no additional Python hook is required. The imported users receive nextcloudEnabled=0, which disables their Nextcloud access.
Existing legal guardians need to be processed by the import again for the changed setting to be applied.
Verification
After importing a legal guardian, verify the value with:
udm users/user list --filter username=<USERNAME> | grep nextcloudEnabled
The result should show:
nextcloudEnabled: 0
Notes
A Python hook can also modify user.udm_properties and is useful when the value depends on additional conditions or custom logic. For a static value that applies to every user handled by a dedicated import configuration, using scheme is simpler and avoids maintaining additional Python code.
The scheme:<udm attribute name> configuration is documented in the UCS@school import manual: