Q&A: Can I remove staff roles in UCS@school user imports?

Question

How can I remove the roles staff and teacher_and_staff to have only teacher and student in the dropdown in UCS@school user imports ?

Answer

Bildschirmfoto vom 2020-11-05 15-38-12

Instead of removing these roles from the default group $OU-import-all, you can create a new group $OU-import-teacher-student to have the desired roles:

$OU=schule
eval "$(ucr shell ldap/base)"

udm groups/group create --ignore_exists \
	--position "cn=groups,ou=$OU,${ldap_base}" \
	--set name="$OU-import-teacher-student" \
	--set description="Teacher and Student can be imported in UCS@school user imports" \
	--policy-reference "cn=schoolimport-all,cn=UMC,cn=policies,${ldap_base}"

udm groups/group modify \
	--dn "cn=$OU-import-teacher-student,cn=groups,ou=$OU,${ldap_base}" \
	--append-option "ucsschoolImportGroup" \
	--set ucsschoolImportSchool="$OU" \
	--append ucsschoolImportRole=student \
	--append ucsschoolImportRole=teacher
2 Likes
Mastodon