Add permission checking
Merge branch 'master' of https://github.com/jerryant/DLS