Changed role class to be polymorphic. Role supports global roles, i.e. roles without a resource attached to them. Admin is now such a global role. Support for User#repositories as polymorphic resources. Owner is no role but a one-to-one relation between repository and users. User#all_repositories returns repositories the user has roles on, plus repositories that it owns. Reworked auth related methods to support the new models. Added has/add/delete role convenience methods to User. Fixed specs.
Merged Bart's changes (SMTP settings) with Dawa's changes: Changed role class to be polymorphic. Role supports global roles, i.e. roles without a resource attached to them. Admin is now such a global role. Support for User#repositories as polymorphic resources. Owner is no role but a one-to-one relation between repository and user. Added has/delete/add role convenience methods to User. Fixed specs