<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
span.EmailStyle17
        {font-family:"Calibri","sans-serif";
        color:windowtext}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:72.0pt 72.0pt 72.0pt 72.0pt}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi all,</p>
<p class="MsoNormal">How do you all assign the eduPersonAffiliation attribute to your users? Currently we use the following script to assign it based on Organisational Unit, but this is starting to prove too limiting as we have users within the same OUs that
 I&#8217;d like to assign different edupersonaffiliation attributes to.</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);</p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eduPersonAffiliation = new BasicAttribute(&quot;eduPersonAffiliation&quot;);</p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dn = distinguishedName.getValues().get(0).toLowerCase();</p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (dn.contains(&quot;ou=student&quot;)) {</p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; eduPersonAffiliation.getValues().add(&quot;student&quot;);</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Is there a similar way to script this to go on maybe Security Group membership, or do I need to start looking into adding an extra AD attribute into the user properties, and trying to pull the information out from there?</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal">Cheers,</p>
<p class="MsoNormal">Andi</p>
<p class="MsoNormal">&nbsp;</p>
<p class="MsoNormal"><span style="">________________________</span></p>
<p class="MsoNormal"><span style="">Andi Morris</span></p>
<p class="MsoNormal"><span style="">IT Security Officer</span></p>
<p class="MsoNormal"><span style="">Cardiff Metropolitan University</span></p>
<p class="MsoNormal"><span style="">TEL: 029 20 205720</span></p>
<p class="MsoNormal"><span style="">________________________</span></p>
<p class="MsoNormal">&nbsp;</p>
</div>
<hr>
<br>
>From 1st November 2011 UWIC changed its title to Cardiff Metropolitan University. From the 6th December 2011, as part of this change, all email addresses which included @uwic.ac.uk have changed to @cardiffmet.ac.uk. All emails sent from Cardiff Metropolitan
 University will now be sent from the new @cardiffmet.ac.uk address. <b>Please could you ensure that all of your contact records and databases are updated to reflect this change.</b> Further information can be found on the website
<a href="http://www3.uwic.ac.uk/English/News/Pages/UWIC-Name-Change.aspx">here.</a>
<br>
<br>
Ar Dachwedd y 1af 2011 newidiodd UWIC ei henw i Brifysgol Fetropolitan Caerdydd. O Ragfyr 6ed, fel rhan o'r newid yma, bydd pob cyfeiriad e-bost sy'n cynnwys @uwic.ac.uk yn newid i @cardiffmet.ac.uk. Bydd yr holl ebyst a ddanfonir o Brifysgol Fetropolitan Caerdydd
 yn cael eu danfon o&#8216;r cyfeiriad @cardiffmet.ac.uk newydd. <b>Gwnewch yn siwr eich bod yn diweddaru eich cofnodion cyswllt a'ch cronfeydd data i adlewyrchu hyn.</b> Gellir cael rhagor o wybodaeth ar y wefan
<a href="http://www3.uwic.ac.uk/English/News/Pages/UWIC-Name-Change.aspx">yma.</a>
<br>
<br>
</body>
</html>