Add logging for decorator webapi_check_local_site when return PERMISSION_DENIED
Review Request #7868 — Created Jan. 15, 2016 and submitted — Latest diff uploaded
Add logging for decorator webapi_check_local_site when return PERMISSION_DENIED
decorator webapi_check_local_site covers a large numbers of permission checks. When user does not have permission, we return 403 and we are expecting meaningful output in the server-side logs. Current implementation of the decorator is lack of the logging capability. This patch adds 3 logging statements when the decorator returns PERMISSION_DENIED
I manually tested that the server does log events when
- User is not allowed too access the local site
- User tries to access a local site with invalid token
- User tries to access with a valid token but with no local site name