Wild camping on part of a Devon moor has been ruled illegal by the High Court unless permission given.