Is it possible to set storage read/write rules based on database data?

I'm trying to understand how to make the connection between database rows and storage items. For example, if a user is not premium on the users table, they should not be able to see what's in a given bucket and vise versa.
Was this page helpful?