Each enclosure in Zooniverse can have one or more caretakers responsible for its daily management. Caretakers are standard user accounts with a restricted view — they only see the enclosures they have been assigned to. Admins manage these assignments directly from the enclosure edit form, and changes take effect immediately upon saving.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/raczkodavid/Zooniverse/llms.txt
Use this file to discover all available pages before exploring further.
The enclosure_user Pivot Table
Users and enclosures share a many-to-many relationship, meaning a single caretaker can be responsible for multiple enclosures and a single enclosure can have multiple caretakers. This relationship is backed by the enclosure_user pivot table, created by the following migration:
belongsToMany:
How the Sync Operation Works
When an admin saves the enclosure edit form, the controller callssync() on the users() relationship:
sync() replaces all existing caretaker assignments for the enclosure with the submitted list. Any user IDs present in the database but absent from the new list are detached, and any new IDs are attached. This is an atomic replacement — there is no need to manually detach old assignments before adding new ones.
If the form is submitted with no caretakers selected,
$request->caretakers will be null. Laravel’s sync(null) detaches all caretakers from the enclosure.What Caretakers See After Assignment
The enclosure index controller checks whether the logged-in user is an admin to determine which enclosures to display:The
admin column on the users table is cast to a boolean. Caretakers are any users where admin is false.Assigning a Caretaker to an Enclosure
Caretaker assignment is only available when editing an existing enclosure — the create form does not include it. Open the edit form for the enclosure you want to configure.Open the enclosure edit form
Navigate to the enclosures list and click the edit button for the target enclosure. The edit form loads the enclosure’s current name, animal limit, and feeding time.
Open the caretaker selection modal
Click the Select Caretakers button. A modal dialog appears listing every user account in the system, with checkboxes pre-checked for users who are already assigned.
Select the caretakers
Check the boxes next to each user you want to assign to this enclosure. You can select any number of users. Currently assigned caretakers are pre-selected automatically.
To remove a caretaker, re-open the modal, deselect the user, and save the form. The
sync() call will detach that user from the enclosure. The user account itself is not affected.