resource registry refactor; permission checking may not work