Implement CHECK_RIGHTS attribute for api methods.