avoinministerio/avoinministerio — pull request #212 by jyrkive (2012-08-02 14:20:29+00:00)
Title: Add ability to allow signing an idea multiple times with an environment variable

It has been hardcoded if a citizen is allowed to sign the same proposal multiple times. It is undesirable: disallowing it makes demonstrating the feature difficult, while allowing it is a big security risk (it might be left to allowed in production) and causes some automated tests to fail.

This commit adds ability to control that with a new environment variable, Allow_Signing_Multiple_Times. If the environment variable is not set, a citizen is allowed to sign the idea only once. If it is set, a citizen is allowed to sign the proposal as many times as he/she wants. *The value of the environment variable does not matter: even if its value is an empty string, "0" or "false", it means that the citizen is allowed to sign each proposal multiple times. The only way to disallow signing the idea multiple times is making sure that the environment variable does not exist.*