From ba97c652726c891e99fbbc9e06d678f70ecf4389 Mon Sep 17 00:00:00 2001
From: "renater.salaun" <renater.salaun@047e039d-479c-447e-8a29-aa6bf4a09bab>
Date: Wed, 30 Mar 2016 09:33:30 +0000
Subject: [PATCH] [Requested by L.Haemmerle] Added a new 'fullset1' user
 profile with additional attributes sn and givenName

git-svn-id: https://svn.geant.net/GEANT/edugain_testidp_account_manager/trunk@122 047e039d-479c-447e-8a29-aa6bf4a09bab
---
 conf/default-Conf.pm                   |  2 +-
 templates/accountProfiles/fullset1.tt2 | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 templates/accountProfiles/fullset1.tt2

diff --git a/conf/default-Conf.pm b/conf/default-Conf.pm
index a06b6d6..c0e71b5 100644
--- a/conf/default-Conf.pm
+++ b/conf/default-Conf.pm
@@ -81,7 +81,7 @@ our %global = (
     'federation_metadata_file_path' => '/opt/testidp/IdPAccountManager/conf/edugain-md.xml',
     
     ## valid account profiles
-    'account_profiles' => ['limitedset1','generic1','student1','student2','teacher1','teacher2','alumni1','librarywalkin1','employee1','researcher1'],
+    'account_profiles' => ['fullset1','limitedset1','generic1','student1','student2','teacher1','teacher2','alumni1','librarywalkin1','employee1','researcher1'],
 );
     
 1; # Magic true value required at end of module
diff --git a/templates/accountProfiles/fullset1.tt2 b/templates/accountProfiles/fullset1.tt2
new file mode 100644
index 0000000..834e447
--- /dev/null
+++ b/templates/accountProfiles/fullset1.tt2
@@ -0,0 +1,20 @@
+[% account_sp_entityid = account.get('sp_entityid') %]
+[% account_id = account.get('id') %]
+
+[% SET account_profile = {
+	'type' => 'FullSet',
+	'comment' => "This user profile respresents a researcher with all eduGAIN user attributes plus givenName and surname.",
+  	'internal_uid' => "user${account_id}",
+	'eduPersonAffiliation' => ['member', 'faculty'],
+	'eduPersonScopedAffiliation' => ["member@${conf.idp_scope}", "faculty@${conf.idp_scope}"],
+        'displayName' => 'Gundabald Lightfoot - eduGAIN Access Check account',
+        'cn' => 'Gundabald Lightfoot - eduGAIN Access Check account',
+        'givenName' => 'Gundabald',
+        'sn' => 'Lightfoot - eduGAIN Access Check account',
+        'mail' => "gundabald.lightfoot@${conf.idp_scope}",
+        'eduPersonPrincipalName' =>"${account_id}@${conf.idp_scope}",
+        'schacHomeOrganization' => "${conf.idp_scope}",
+        'schacHomeOrganizationType' => 'urn:schac:homeOrganizationType:int:other',
+} %]
+
+
-- 
GitLab