basic permissions checking
Merge pull request #9 from ehemsley/permissions

basic permissions checking