Add Permissions Model.

This PR is still a WIP, as is the feature in general.