<div dir="ltr">Why not create another attribute based on group membership &amp; then use a MappedAttribute to build eduPersonAffiliation?  <a href="https://wiki.shibboleth.net/confluence/display/SHIB2/ResolverMappedAttributeDefinition">https://wiki.shibboleth.net/confluence/display/SHIB2/ResolverMappedAttributeDefinition</a><div>
<br></div><div>We do this for eduPersonEntitlement and it&#39;s worked out quite well.</div><div><br>Dave</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jul 11, 2013 at 9:17 AM, Morris, Andi <span dir="ltr">&lt;<a href="mailto:amorris@cardiffmet.ac.uk" target="_blank">amorris@cardiffmet.ac.uk</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-GB" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hi all,<u></u><u></u></p>
<p class="MsoNormal">We currently assign eduPersonAffiliation depending on Active Directory group membership, but there is a bit of a crossover with two of our groups starting with the same string.<u></u><u></u></p>
<p class="MsoNormal">Users that are members of the group “STUDENT” get added the ‘student’ value added to the eduPersonAffiliation attribute just fine, but members of the group “STU” are members of our student union and need to be given the value ‘member’,
 except that they are being given ‘student’.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The code I’m using to get this is:<u></u><u></u></p>
<p class="MsoNormal">“                if (value.contains(&quot;student&quot;)) {<u></u><u></u></p>
<p class="MsoNormal">                    eduPersonAffiliation.getValues().add(&quot;student&quot;);<u></u><u></u></p>
<p class="MsoNormal">“<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’ve tried changing value.contains to value.equals, but this just ends up with neither group being assigned a value for this attribute.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Can anybody please help with this scripting query? Apologies that it’s not strictly a shibboleth issue.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Cheers,<u></u><u></u></p>
<p class="MsoNormal">Andi<u></u><u></u></p>
</div>
</div>

<br>--<br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.net</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>David Langenberg<div>Identity &amp; Access Management</div>
<div>The University of Chicago</div>
</div>