Exemplo n.º 1
0
def validationAndSuspendedChecker(info):
    props = get_properties(info.principal.uri)
    if props.suspended:
        info.message = u'Account is suspended.'
        info.arguments['suspended'] = True
        return False

    if props.validated:
        return True

    if not CROWD['validation']:
        return True

    if CROWD['allow-unvalidated'] or props.validated:
        return True

    info.message = u'Account is not validated.'
    info.arguments['validation'] = False
    return False
Exemplo n.º 2
0
def principalAdded(ev):
    props = get_properties(ev.principal.uri)
    props.joined = datetime.now()
    props.validated = True
Exemplo n.º 3
0
def principalRegistered(ev):
    props = get_properties(ev.principal.uri)
    props.joined = datetime.now()

    if not CROWD['validation']:
        props.validated = True
Exemplo n.º 4
0
 def get_props(self, uri):
     return get_properties(uri)