We are currently investigating few options and our favourite is not to do that. We are calculating total space MINUS database size. And when the database with disk size is larger then the plan (our base is 40 GB), we set the database read only (or rather the user to be specific).
But I would like to hear other ideas how to approach this.
Note: we are using custom panel, so user can't change privileges as they wish.
Note 2: we do have to calculate the size of database on our own, sice the EP does not work since v12.x