added permissions check closes #742