Site icon Hip-Hop Website Design and Development

How can I disable new plugin and theme install, but allow updates?

I’ve already tried the DISALLOW_FILE_MODS constant, but it disables plugin updates as well, which is not what I need. I need automatic theme and plugin update checking, and the ability to install the found updates to work in the WordPress dashboard, but disallow new plugin and theme installs. How could I achieve this?