Fixed check-permissions so as not to run code, and added setting and getting of the global hash via REST