Update inventory in a non-guest / buyer authorization database

I have a product database in the store, I set it up as a view for everyone but of course editing and writing just for procedures, I would like to make sure that when someone enters a product page, for example, or buys a product, the inventory that is also in that database is updated, except that there is no permission for a friend or guest To the administrator, how can I skip it and still allow it, if I do it through the server it is possible? I would love to guide in this matter. Thanks.
@givemeawhisky
@kebrenner