added changes from bcodding/gitperms