Open bobintetley opened 5 months ago
The options should go under Remove->System->Remove fine-grained animal permissions, and Remove fine-grained person permissions (both set by default)
Like animalcontrol.py, animal.py and person.py will need their own reduce_find_results functions that are called by their find routines to throw away rows the user does not have permission to view. shelterview will need to call the animal one as well.
animal.py currently has a function get_location_filter_where_clause that does most of this, but it does it by some difficult logic and writing SQL. It would be a lot simpler if it were reimplemented as a reduce type function that throws away unwanted records the way that animalcontrol does.
LocationFilter became an object in animal.py, it would make sense to implement the reduce functionality there
Similar to how we do for incidents, allow an option to turn on extra view permissions for animals and people.
This would allow for a role dropdown on animals and people records, where users can assign the only roles that are allowed to view that specific record.
A lot of people have asked for this over the years.