Only show the delete button if they have permission to edit at least one of the items in the list.
Added a catch for incorrect image types to throw our own custom exception instead.
The setup command should use the user manager, not the user repository.