Fix permission check. Use groups.