some bugfixes for permissions checking
some bugfixes for permissions checking

praveenscience/thebuggenie,deshion/thebuggenie,azaghal/thebuggenie,gabor-udvari/thebuggenie,LogosLabs/thebuggenie,SysBind/thebuggenie,thebuggenie/thebuggenie,praveenscience/thebuggenie,deshion/thebuggenie,stolenbike/thebuggenie,hurie/thebuggenie,dachaac/thebuggenie,thebuggenie/thebuggenie,gabor-udvari/thebuggenie,JonathanRH/thebuggenie,hurie/thebuggenie,nrensen/thebuggenie,dachaac/thebuggenie,SysBind/thebuggenie,gabor-udvari/thebuggenie,JonathanRH/thebuggenie,SysBind/thebuggenie,milkyway-git/thebuggenie,dachaac/thebuggenie,SamMousa/thebuggenie,milkyway-git/thebuggenie,hurie/thebuggenie,gabor-udvari/thebuggenie,thebuggenie/thebuggenie,Rvanlaak/thebuggenie,thebuggenie/thebuggenie,dachaac/thebuggenie,deshion/thebuggenie,nrensen/thebuggenie,azaghal/thebuggenie,SamMousa/thebuggenie,azaghal/thebuggenie,thebuggenie/thebuggenie,stolenbike/thebuggenie,Rvanlaak/thebuggenie,stolenbike/thebuggenie,SamMousa/thebuggenie,LogosLabs/thebuggenie,milkyway-git/thebuggenie,deshion/thebuggenie,SamMousa/thebuggenie,LogosLabs/thebuggenie,SysBind/thebuggenie,nrensen/thebuggenie,JonathanRH/thebuggenie,Rvanlaak/thebuggenie,stolenbike/thebuggenie,praveenscience/thebuggenie,praveenscience/thebuggenie,milkyway-git/thebuggenie,LogosLabs/thebuggenie,hurie/thebuggenie,nrensen/thebuggenie,azaghal/thebuggenie,JonathanRH/thebuggenie,Rvanlaak/thebuggenie