Revert "remove authorization check"

This reverts commit 8cffbc1c4c7012a188dfdf274dadac26300b0597.