Recently I got a query about hiding the New and Upload buttons for a SharePoint library, because there was a need to allow users to browse documents using out-of-the-box SharePoint views in a library while still having permissions to upload files so that they could upload files using an SPFx WebPart or a Canvas App.
The JSON-based functionality enables simple adjustments to the command bar, such as changing the icon or text, hiding already-existing options, or moving commands.