i want to change my settings so that users can create there own account, i have done all the settings meaing creating default user role and default organisation unit. but my question is suppose in our organisation hierarchy includes also schools in different district,sector,province just like in dhis2 education, i want that headteachers to create their own accounts and the headteacher should have access to his/her school only so how could set the default organisation unit for this case ?
It’s not currently possible for self-registration to select their own OU; however, it’s possible to set a default OU for ALL the self-registrations, would that help?
If it doesn’t need to be real-time and manually set by the headteachers, you could use the API to make this work:
Get the list of users emails addresses
Filter the list to only show the headteachers’ email addresses
Set the specific OU to each user in the list
Export this list to update the user info (assigned OUs)