Add permission support to auth_required and auth_optional
Sync with the latest changes
Sync with the latest changes