def _checkSendAuthorizations(self):
        "MT Authorizations check"

        if not self.user.mt_credential.getAuthorization('http_send'):
            raise CredentialValidationError(
                'Authorization failed for user [%s] (Cannot send MT messages).' % self.user)
        if (hasattr(self.submit_sm, 'nextPdu')
                and not self.user.mt_credential.getAuthorization('http_long_content')):
            raise CredentialValidationError(
                'Authorization failed for user [%s] (Long content not authorized).' % self.user)
        if ('dlr-level' in self.request.args
                and not self.user.mt_credential.getAuthorization('set_dlr_level')):
            raise CredentialValidationError(
                'Authorization failed for user [%s] (Setting dlr level not authorized).' % self.user)
        if ('dlr-method' in self.request.args
                and not self.user.mt_credential.getAuthorization('http_set_dlr_method')):
            raise CredentialValidationError(
                'Authorization failed for user [%s] (Setting dlr method not authorized).' % self.user)
        if ('from' in self.request.args
                and not self.user.mt_credential.getAuthorization('set_source_address')):
            raise CredentialValidationError(
                'Authorization failed for user [%s] (Setting source address not authorized).' % self.user)
        if ('priority' in self.request.args
                and not self.user.mt_credential.getAuthorization('set_priority')):
            raise CredentialValidationError(
                'Authorization failed for user [%s] (Setting priority not authorized).' % self.user)
        if ('validity-period' in self.request.args
                and not self.user.mt_credential.getAuthorization('set_validity_period')):
            raise CredentialValidationError(
                'Authorization failed for user [%s] (Setting validity period not authorized).' % self.user)
dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/http/validation.py/HttpAPICredentialValidator._checkSendAuthorizations/original