Refactored permissions to deal with multiple roles
Merge branch 'dev' of git://github.com/novius-os/core into dev