opf/openproject — pull request #226 by meeee (2013-07-02 13:08:28+00:00)
Title: Refactor user status

User status numbers were defined only as constants, which made handling them difficult. Multiple helpers had knowledge of the different numbers' meaning.

Now, User has a status_name method, which returns a symbol describing the user's status. The helpers now use this status_name instead of the numbers. Unfortunately, the helpers are also used for principals, which are not users, so this adds a method to principal always returning active, which is the default by schema.rb.