danzajdband/hackdash — pull request #51 by mativs (2013-07-10 19:26:15+00:00)
Title: Stage configuration with allowed actions for each

### Decription
Stage configuration with allowed actions for each stage.

### Stage Length
Two keys are used; *start* and *end*. There value is a date string using the ISO-8601 format, better explained [here](http://momentjs.com/docs/#/parsing/string/). If any of the two keys is not setted the system interprets infinite values; negative on time for *start* and positive on time for *end*.

### Actions
- *view*: Registered users can see projects.
- *edit*: Registered users can edit their own projects.
- *remove*: Registered users can remove their own projects.
- *create*: Registeres users can create their own projects.
- *view-anonymous*: Anonymous users can see projects.

### Some considerations
- If your hackaton is running on a period of time where no stage is configured there will be no rights for any action.
- Admin can always do what he wants.
- If two stages overlap each other, the first one on configuration will be used.

### Example
"stages" : [
{
"name": "submission",
"start": "2013-07-01",
"end": "2013-08-01",
"permissions": ["view", "edit", "create"]
},
{
"name": "gallery",
"start": "2013-09-01 00:00",
"permissions": ["view", "view-anonymous"]
}
]

### Todo
- Add configuration to admin