Added group permissions check