HMRC makes the situation as murky as possible. Tax avoidance is legal behaviour, so you cannot be prosecuted for it per se, but transactions deemed carried out solely for the purposes of avoidance may be set aside. A considerable amount of discretion is in practice exercised by inspectors. And a curiously British institution is a fantastically complex and often vague tax law (it isn't a code), in connection with which the authorities will never as a matter of policy confirm that taxpayer behaviour is legal, or (if they can avoid it) make any statement on which you may legally rely. The whole structure is built on draconian unrealistic rules under which taxpayers have few verifiable rights - so they must in practice rely on the custom and practice of extra statutory concessions and judgments about costs and the willingness of the authorities to pursue any particular issue.
Rather than sitting around in shops causing trouble and looking like a bunch of idiots UK Uncut could do us all a favour and lobby for a clear and transparent tax regime. I know tax simplification isn't sexy, but it's really at the heart of any 'avoidance' problem.