summaryrefslogtreecommitdiffstats
path: root/django/sp_sso/invite/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/sp_sso/invite/utils.py')
-rw-r--r--django/sp_sso/invite/utils.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/django/sp_sso/invite/utils.py b/django/sp_sso/invite/utils.py
index 5cc40fd..4f49b39 100644
--- a/django/sp_sso/invite/utils.py
+++ b/django/sp_sso/invite/utils.py
@@ -21,12 +21,21 @@ PASSERELLE_PEOPLE_QUERY = 'http://dir-condorcet.dev.entrouvert.org/ldapquery/con
logger = logging.getLogger('django')
def get_invitaton_attributes_mapping():
+ """ Full copy of the invitation attributes mapping dictionary """
return INVITATION_ATTRIBUTES_MAPPING.copy()
def get_additional_prefilled_fields():
+ """
+ Returns a full copy of the additional fields to be prefilled with the
+ user's fetched attributes.
+ """
return ADDITIONAL_PREFILLED_FIELDS[:]
def do_invite(invitation):
+ """
+ Sends invitation data to the invitation w.c.s. form.
+ Invitations will then be sent as part of the w.c.s. workflow.
+ """
opener = build_opener(HTTPHandler)
# Generate a JSON to bind against the wcs ReST API
form = {}
@@ -48,6 +57,10 @@ def do_invite(invitation):
def get_affectations_from_eppn(eppn):
+ """
+ Returns a tuple (<Institution identifier>, <Researcher unit identifier>)
+ for a given eduPersonPrincipalName (a.k.a. `eppn`)
+ """
if eppn:
try:
ldapquery = urlopen(PASSERELLE_PEOPLE_QUERY)