setting up permissions in the db