Added QueryPermissionsMethod.
Merge remote-tracking branch 'origin/pep'