Skip to content

Latest commit

 

History

History
101 lines (69 loc) · 3.16 KB

File metadata and controls

101 lines (69 loc) · 3.16 KB

Plone Intranet Invitations

Build status

Unit tests

https://travis-ci.org/ploneintranet/ploneintranet.invitations.svg?branch=master https://coveralls.io/repos/ploneintranet/ploneintranet.invitations/badge.png?branch=master http://jenkins.ploneintranet.net/buildStatus/icon?job=Plone%20Intranet%20Notifications

Robot tests for Plone Intranet

http://jenkins.ploneintranet.net/buildStatus/icon?job=Plone%20Intranet%20Suite%20Master

This package provides the following:

Invite users via email

Ability to invite users to a plone site using a unique URL, rather than a username and password

  • Invites are linked to an email address
  • Unique login URL is sent via email
  • Accessing unique login URL will create a user account and authenticate them
  • Subsequent use of login URL will authenticate

Generic token framework

  • Provides a unique url (used to accept the token)
  • Fires an event when a token is accepted
  • Optionally redirect to a custom path when token is accepted
  • Optionally provide limits to tokens - Expiry time - Number of uses

Installation

  • Add ploneintranet.invitations to your buildout eggs
  • Activate ploneintranet.invitations via plone control panel

Invitation Usage

  • Control panel -> ploneintranet.invitations

Using the token framework

To create a new token:

from zope.component import getUtility
from ploneintranet.invitations.interfaces import ITokenUtility

token_util = getUtility(ITokenUtility)
token_id, token_url = token_util.generate_new_token()

You can then register an event subscriber that will be trigged when the token url is visited:

<subscriber
    for="ploneintranet.invitations.events.ITokenAccepted"
    handler=".subscribers.handle_token_accepted" />
def handle_token_accepted(event):
    token_id = event.token_id
    # do something cool

Copyright (c) Plone Foundation

This package is Copyright (c) Plone Foundation.

Any contribution to this package implies consent and intent to irrevocably transfer all copyrights on the code you contribute, to the Plone Foundation, under the condition that the code remains under a OSI-approved license.

To contribute, you need to have signed a Plone Foundation contributor agreement. If you're listed on Github as a member of the Plone organization, you already signed.