Merge "[RESTRICT AUTOMERGE] Correct argument order in permission check" into pi-dev