jplusplus/detective.io — pull request #383 by vied12 (2014-08-08 13:39:58+00:00)
Title: Feature/separate users into tiers

## New Features

- DetectiveUserProfile model added with a `plan` attribute
- Data migration (number 0020) which assigns a plan related to properties defined in `detective.settings.PLAN` (see below)
- Show the current plan for each user in administration
- Dynamic attribute `entities_count` added to `Topic` model
- Show the value of `entities_count` for each topic in administration

## Current Value of `detective.settings.PLAN`
```python
PLANS = [
{"Free" : {"max_investigation" : 3, "max_entities" : 100 }},
{"Low" : {"max_investigation" : 5, "max_entities" : 500 }},
{"Medium" : {"max_investigation" : -1, "max_entities" : 1000}},
{"High" : {"max_investigation" : -1, "max_entities" : -1 }},
{"Enterprise" : {"max_investigation" : -1, "max_entities" : -1 }}
]
```

## Results of plan assignations on Staging

```
Creating Profile for Users
smk ---> Free
another_one ---> Free
peter ---> Free
nkb-test ---> Free
horst ---> Free
nkb.fr ---> Free
detective ---> High
blabla ---> Free
pbellon ---> Free
nutzer ---> Free
test_buddy ---> Free
toutenrab ---> Free
florian.gossy ---> Free
test_user ---> Free
edouard ---> Free
annelise ---> Free
paulloz ---> Free
pirhoo ---> Free
sm_kraus ---> Medium
edou4rd ---> Free
nkb ---> Low
```
@smkraus wins !