Changed RmPerson.accessible_roles to RmPerson.accessible_applications
Filled in logic to calculate and update local applications from RM data