Fixed a number of permission checks that were not being done.