implement permissions, ownsDevice and other security related features in the CRUD