l.s.m.m.m.DirectEmailAuthorization : class documentation

Part of lp.services.messages.model.message View In Hierarchy

See IDirectEmailAuthorization.
Method __init__ Create a UserContactBy instance.
Method is_allowed See IDirectEmailAuthorization.
Method throttle_date See IDirectEmailAuthorization.
Method message_quota See IDirectEmailAuthorization.
Method record See IDirectEmailAuthorization.
Method _getThrottlers Return a result set of entries affecting throttling decisions.
Method _isAllowedAfter Like .is_allowed but used with an explicit cutoff date.
def __init__(self, sender):
Create a UserContactBy instance.
ParameterssenderThe sender we're checking. (type: IPerson)
afterThe cutoff date for throttling. Primarily used only for testing purposes. (type: datetime.datetime)
def _getThrottlers(self, after):
Return a result set of entries affecting throttling decisions.
ParametersafterExplicit cut off date. (type: datetime.datetime)
def _isAllowedAfter(self, after):
Like .is_allowed but used with an explicit cutoff date.

For testing purposes only.

ParametersafterExplicit cut off date. (type: datetime.datetime)
ReturnsTrue if email is allowed (type: bool)
@property
def is_allowed(self):
See IDirectEmailAuthorization.
@property
def throttle_date(self):
See IDirectEmailAuthorization.
@property
def message_quota(self):
See IDirectEmailAuthorization.
def record(self, message):
See IDirectEmailAuthorization.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.