Hacking out the permissions code.  Need to fix some TODOs in there, though