Permissions

Added automatic adding to permission groups. 
You need to indent with 4 spaces instead of tabs. In Python a tab is treated as 8 spaces i.e. two levels of nesting. So where you might think you have only a single level of nesting it will be counted as 2 levels by Python and this would be a really awful bug to track down.