Ejemplo n.º 1
0
def notify_pending(acl_entry):
    """Sends a notification to a user with an email-based ACL entry

    :param acl_entry: An email-based EventPrincipal
    """
    assert acl_entry.type == PrincipalType.email
    if acl_entry.full_access:
        template_name = 'events/emails/pending_manager.txt'
        endpoint = 'event_mgmt.conferenceModification-managementAccess'
    elif acl_entry.has_management_role('submit', explicit=True):
        template_name = 'events/emails/pending_submitter.txt'
        endpoint = 'event.conferenceDisplay'
    else:
        return
    event = acl_entry.event_new
    email = acl_entry.principal.email
    template = get_template_module(template_name,
                                   event=event,
                                   email=email,
                                   url=url_for_register(url_for(
                                       endpoint, event),
                                                        email=email))
    send_email(make_email(to_list={email}, template=template),
               event.as_legacy,
               module='Protection')
Ejemplo n.º 2
0
    def getBody(self):
        # we go to the login page since local registration might be disabled
        # in the future it would be nice to use a different messages depending
        # if local identities are enabled or not
        url = url_for_register()
        return """
    You have been granted with file submission rights for the following event:%s
    Please create an account in Indico in order to use these rights. You can create your account at the following URL:

    <%s>

    *Note that you must use this email address %s when creating the account*

    Best Regards.

    --
    Indico"""%( self._getParticipations(), url, self._psList[0].getEmail() )
Ejemplo n.º 3
0
    def getBody(self):
        # we go to the login page since local registration might be disabled
        # in the future it would be nice to use a different messages depending
        # if local identities are enabled or not
        url = url_for_register()
        return """
    You have been added as convener of the following sessions:%s
    And session coordination rights have been granted to you.
    Please create an account in Indico in order to use these rights. You can create your account at the following URL:

    <%s>

    *Note that you must use this email address %s when creating your account*

    Best Regards.

    --
    Indico""" % (self._getParticipations(), url, self._psList[0].getEmail())
Ejemplo n.º 4
0
def notify_pending(acl_entry):
    """Sends a notification to a user with an email-based ACL entry

    :param acl_entry: An email-based EventPrincipal
    """
    assert acl_entry.type == PrincipalType.email
    if acl_entry.full_access:
        template_name = 'events/emails/pending_manager.txt'
        endpoint = 'event_mgmt.conferenceModification-managementAccess'
    elif acl_entry.has_management_role('submit', explicit=True):
        template_name = 'events/emails/pending_submitter.txt'
        endpoint = 'event.conferenceDisplay'
    else:
        return
    event = acl_entry.event_new
    email = acl_entry.principal.email
    template = get_template_module(template_name, event=event, email=email,
                                   url=url_for_register(url_for(endpoint, event), email=email))
    send_email(make_email(to_list={email}, template=template), event.as_legacy, module='Protection')
Ejemplo n.º 5
0
 def render(cls, person, event, **kwargs):
     url = url_for_register(event.url, email=person.email)
     return Markup('<a href="{url}">{url}</a>').format(url=url)
Ejemplo n.º 6
0
 def render(cls, person, event, **kwargs):
     url = url_for_register(event.url, email=person.email)
     return Markup('<a href="{url}">{url}</a>'.format(url=url))