dabapps/django-user-roles — pull request #12 by laginha (2014-04-13 12:59:47+00:00)
Title: Subroles with hierarchy

Added support for subroles with hierarchy defined by the order within the item tuple. I've also changed the code a little bit.

```python
USER_ROLES = (
'manager',
'moderator',
'client',
('developer', 'senior_developer')
)
```
```
>>> roles.senior_developer.is_subrole( roles.developer )
False
>>> roles.developer.is_subrole( roles.senior_developer )
True
>>> roles.developer.is_subrole( "senior_developer" )
True
```

Unfortunately, I couldn't test it properly.

- At first a problem occurred while installing milkman. Had to install [this](https://github.com/davidwtbuxton/milkman) forked version
- Later I noticed the tests all failed, even without my changes. The way the test were made is not compatible with recent versions of Django.

I think i didn't break anything though. I've tested with another project of mine that uses `userroles`