24 April, 2012 · 2 minutes to read
SLK 1.7 Has a Pluggable Architecture for Domain Group Enumeration
I've just finished adding a new feature to SLK 1.7 which allows the Domain Group Enumeration of members to be swapped out for an alternative implementation. This is pretty much an edge case, which isn't going to be needed by the vast majority of SLK users, but it has allowed me to add an implementation which prevents domain groups being used to assign to.
The reason I added this functionality is that a customer had a need, was willing to pay to get it developed in the timescale they needed and I decided it wouldn't negatively impact the project. They needed it as they were using Active Directory Federation Services and had implemented some custom functionality in their projects which allowed them to associate users in the federated domains, with local Active Directory groups. Of course, SLK didn't understand this, and couldn't link the membership of the groups with the federated users. As SLK is a key part of their SharePoint implementation this was a problem.
They could have used the federated users in SharePoint groups which would have worked out of the box with SLK, but decided that it didn't fit in with their architecture. So we figured out a pluggable method of enumerating the group members would work best. They can write a class which understands their architecture and just plug it into SLK.
As part of the implementation I've created a plug in which prevents the use of Active Directory groups for assigning work through SLK. This was mainly as a test case for the pluggable architecture, but I choose this as it is a potentially useful functionality rather than just a random test. When this plug in is chosen no active directory groups are displayed when choosing SLK Members. The two main areas where SLK Members are displayed are the assignment properties page when creating or editing an assignment and the SLK Members web part.
I don't expect this to be used very often, but I can see the occasional use of it.
This is configured in the SlkSettings.xml file i.e. at the site collection + level. To configure it you add a DomainGroupEnumerator element just before any Query elements.
The DomainGroupEnumerator has two attributes:
<DomainGroupEnumerator Type="Microsoft.SharePointLearningKit.DomainGroupEnumeratorNoGroups" Assembly="Microsoft.SharePointLearningKit, Version=22.214.171.124, Culture=neutral, PublicKeyToken=24e5ae139825747e"/>
As this is part of the SLK project there is a short version of it which is
To use the default implementation, which enumerates AD groups just leave out the DomainGroupEnumerator element or have an empty Type.
To implement your own version of a Domain Group Enumerator, all you need to do is:
public abstract DomainGroupEnumeratorResults EnumerateGroup(SPUser
domainGroup, SPWeb web, TimeSpan timeRemaining, bool hideDisabledUsers);
The parameters are:
The return value is a DomainGroupEnumeratorResults. This has 3 properties which must be set by the implementation:
If you want to look at the two included implementation, all the domain group enumerator classes are in the source code in Slk\Dll\enumerateDomainGroups.
Managing Director / Founder
Richard started SalamanderSoft in 2007 after a successful career as a software developer. Wanting to start his own company and with experience in integrating school systems he set out to build the best integration system for schools and to exceed customer expectations. He starting out on his own, doing all the coding, support and sales until finally the growing number of customers meant he needed to start growing the team. He is still heavily involved in coding the core Integration Suite product in addition to running the company and being the first point of contact for prospective customers.