diff --git a/django/sp_sso/saml/forms.py b/django/sp_sso/saml/forms.py index 8d87575..9cf0224 100644 --- a/django/sp_sso/saml/forms.py +++ b/django/sp_sso/saml/forms.py @@ -107,6 +107,8 @@ class RegistrationForm(forms.Form): # supannEtablissement s_etablissement = forms.CharField( required=False, max_length=100, label=_("Institution")) + invite_unite = forms.CharField( + required=False, label=_("Research entity or unit"), initial='') # supannEntiteAffectationPrincipale s_entite_affectation_principale = forms.CharField( required=False, max_length=100, label=_("Assignment unit")) diff --git a/django/sp_sso/saml/models.py b/django/sp_sso/saml/models.py index ea5429b..14bdb55 100644 --- a/django/sp_sso/saml/models.py +++ b/django/sp_sso/saml/models.py @@ -20,6 +20,7 @@ class SupAnnUser(AbstractUser): s_entite_affectation = models.CharField(max_length=100, default="") s_emp_corps = models.CharField(max_length=100, default="") s_etablissement = models.CharField(max_length=100, default="") + invite_unite = models.CharField(max_length=100, default="") s_liste_rouge = models.BooleanField(default=False) REQUIRED_FIELDS = [] diff --git a/django/sp_sso/saml/utils.py b/django/sp_sso/saml/utils.py index cc44b49..adcc20b 100644 --- a/django/sp_sso/saml/utils.py +++ b/django/sp_sso/saml/utils.py @@ -19,7 +19,7 @@ sso_attributes = [ 'prenom', 'nom', 'email', 'ep_principal_name', 'ep_primary_affiliation', 'ep_affiliation', 's_etablissement', 's_entite_affectation_principale', 's_entite_affectation', 's_emp_corps', 'hote_unite', 'hote_etablissement', - 's_liste_rouge', 'hote_commentaire'] + 's_liste_rouge', 'hote_commentaire', 'invite_unite'] sso_select_attributes = [ 'ep_primary_affiliation', 'hote_unite', 'hote_etablissement'] diff --git a/django/sp_sso/sp_sso/settings.py b/django/sp_sso/sp_sso/settings.py index 0599688..d983baf 100644 --- a/django/sp_sso/sp_sso/settings.py +++ b/django/sp_sso/sp_sso/settings.py @@ -86,6 +86,7 @@ MELLON_ATTRIBUTE_MAPPING = { 's_entite_affectation' : '{attributes[s_entite_affectation][0]}', 's_emp_corps' : '{attributes[s_emp_corps][0]}', 's_liste_rouge' : '{attributes[s_liste_rouge][0]}', + 'invite_unite' : '{attributes[invite_unite][0]}', } MELLON_SUPERUSER_MAPPING = { diff --git a/django/sp_sso/templates/declare_form.html b/django/sp_sso/templates/declare_form.html index 491941c..8407eb0 100644 --- a/django/sp_sso/templates/declare_form.html +++ b/django/sp_sso/templates/declare_form.html @@ -18,6 +18,7 @@ {% include "registration_field.html" with field=form.prenom %} {% include "registration_field.html" with field=form.email %} {% include "registration_field.html" with field=form.s_etablissement %} + {% include "registration_field.html" with field=form.invite_unite %} {% include "registration_field.html" with field=form.ep_primary_affiliation %} {% include "registration_field.html" with field=form.s_emp_corps %} {% include "registration_field.html" with field=form.s_liste_rouge %}