Fix permission test