Terrorism can only be addressed in grand strategic terms. What is the root cause of it? The Sykes-Picot Agreement was only the starting point. The overthrowing of the liberal, democratically elected Iranian government by the UK and the US in 1953 was more fundamental to the issue, as it was them trying to fight the fire of socialism with the oil of conservatism (or more accurately for the oil and profits of British Petroleum), and removing the only moderate, rational, secular, and stabilising power in the region as the end result. Then, we have the US supporting the Taliban, Saudi Arabia, and other authoritarian factions to fight against liberal values in the name of freedom (and also oil) against the Soviet, and we have the world we have today.
Once national, historical hatred, anger, and fear of Western imperialism, and poverty being understood as a product of Western imperialism, have taken refuge under the irrationality of religion or other beliefs, being utilised by the power hungry to gain more power, no amount of law enforcement and security measures can prevent someone from becoming a terrorist. The only question from then on is whether you can spot them in time and in the right place, all the time. The answer is, again, no, because there is no organisation that can be omniscience and omnipotent with infinite amount of resources and manpower. Also, don’t forget that the US and Canada have been extra-legally sending wrongfully accused “suspected terrorists" to be tortured in a third country, namely Assad’s Syria, the same Assad who was accused of using chemical weapons on his own people, via extraordinary rendition, how is “restricting rights" going to help?
Suppose we have a secular, liberal, democratic, and prospering state in the Middle East, then we might be able to turn the tide. But that’s going to take a long long time, and if we are very lucky, that will probably take us 100 years or more, and that is if we start today. Fact is, nobody is going to do anything of that sort, not only because it is geopolitically unfeasible, but more importantly, it doesn’t benefit the wealthy and the powerful, as it would destroy many of their businesses. (Well, why are Western countries so keen on selling weapons to Saudi Arabia, a country that is well-known for its support of Islamists and its own ultraconservative wahhabism?)
We know that we can never effectively combat terrorism operationally, and no one is willing or able to pursue the grand strategic solution, so where does that leave us? This maybe uncomforting, but accepting it as a fact of life, treating it like cancer, for example, would probably be the second-best (meaning the best attainable) option, as this would allow us to face the crisis bravely. At any rate, accepting it is still miles better than subverting our laws, democratic institutions, and way of lives in order to pseudo-combat it. The latter merely provide you a solace of questionable comfort at the time of the crisis by letting the government doing whatever it wants, when in reality it has done nothing useful of any sort. It is merely an ill-willed promise to get you sign away the whole society’s rights and freedoms.
Once you have done that, congratulations, you have just turned ill-organised individual attacks into institutionalised state terrorism. The latter is much much worse.