Hello,

There have been two major revisions to the core in the past week:

1. FC-116 Need the ability to get user specific attributes for fine grained 
access determinations

2. FC-144 Ability to assign groups to roles

in both cases there were numerous problems related to the tenant id not being 
passed down into the DAO.

with respective JIRA issues opened to resolve:

FC-187 - pass the tenantid (subtask of FC116)
FC-186 - pass tenantid for groupmgr funcs  (subtask of FC144)

To see the resolution please view the git commits that correspond with these.

There are a few undocumented rules that must be followed wrt MT.

1. The Mgr Impl’s contextId is where the caller sets it.  For example:

ReviewMgr rMgr = ReviewMgrFactory.createInstance (“mytenantid”);

2. The Mgr impl’s always pass the value of the contextId to any entity that is 
passed down.  The most common way is:

assertContext( myentity, …);

 which also ensures the entity is not null.  In the case the null check not 
needed, the programmer can simply do this:

myentity.setContextId ( this.contextId );

3. If the Mgr is bypassed, i.e. on P method calls another, it is the 
responsibility of the caller to set the contextId on the entity object.

4. The MT capability can be tested as follows:;

mvn install -Dload.file=./ldap/setup/refreshLDAPData.xml

mvn install -Dload.file=./ldap/setup/refreshLDAPData.xml -Dtenant=Client123

mvn install -Dload.file=./ldap/setup/DelegatedAdminManagerLoad.xml 
-Dtenant=Client123

mvn -Dtest=FortressJUnitTest test -Dtenant=Client123

There are three test tenant’s that are created in the refreshLDAP script, 
Client123, Client456, Client789

Passing one of those to subsequent operations will run those tests / load ops 
on behalf of that tenant.

By running these tests you can ensure that the code being added is properly 
following the rules and passing the tenant down.

I will work on getting this documented in the near future.  Let me know if you 
have any questions.

Thanks,
Shawn





Reply via email to