grnet/synnefo — pull request #106 by apyrgio (2014-06-02 09:00:49+00:00)
Title: Add astakos logic

This PR adds a `logic` module in `astakos`, to handle actions on `AstakosUsers` and validate if they can apply to them, in the same fashion that `cyclades` uses its logic.

For `Projects`, we have done something similar. We have created a check function, that can be used by project actions and other modules, to validate if an action can be applied on a project. However, in order to preserve backwards compatibility, we have kept this functionality in the `im/functions.py` file.

Finally, this PR adds tests for the `logic` module as well as a function to send fully customizable mails to users. All the above have been created in order to pave the way for the integration of the `admin` tool.

Proposed reviewers: @vinilios, @gkorf. I'd suggest @vinilios check the state/transition diagram in `logic/users.py` and see if it depicts correctly the actions on users.