Fixed permissions checks for editing and deleting groups. (closes #224)