Removing the use of the Template User from uPortal
Recently a Client requested help to remove the use of uPortal Template Users. This change will better enable upgrades to future releases of uPortal. This post explains the changes necessary to remove the use of Template Users from a typical uPortal deployment.
Template users are referenced in two configuration files for uPortal. The first location is in the Person Directory configuration. In uPortal 2.4.x, the Person Directory configuration file is PersonDirs.xml. In uPortal 2.5.x and 2.6.x the configuration file will either be the same as uPortal 2.4.x or depending on your installation might be configured with personDirectory.xml. This file must be modified so any reference to uPortalTemplateUserName is removed or commented out. In either configuration file, there may be multiple references that have to be removed. The following shows an example reference from PersonDirs.xml commented out.
Once this change is made, uPortal will have to rely on the system-wide template user name defined in portal.properties. This value cannot be eliminated. The value should, however, be set to a user who is not a member of any group and has no tabs defined in his layout. The user might see any fragments that have been published to the Everyone group, but any tabs in his layout that he can delete, should be deleted. The following is the line that must be set to this user's username in portal.properties.
org.jasig.portal.services.Authentication.defaultTemplateUserName=demo
These are the only changes that must be made to eliminate any use of template users in uPortal 2.4.x, 2.5.x and 2.6.x. Sites that are not using Template Users are encouraged to make extensive use of PAGS and fragments to give users interesting default layouts.
---- Cris J H
- Cris Holdorph's blog
- Login or register to post comments

Patch required to Academus 2.1 for this approach
Note that while the above de-fanged template user approach is feasible in Academus 2.1, it requires that first Academus 2.1 be patched per this KBA. This is also documented in the Academus 2.1 release notes.
add this to uP 2.6?
should we edit the configs provided with 2.6? (or 2.7 if that seems to aggressive) to use this methodology?
also -- where did you stick the login, header, etc. channels? I know Mark B. has that nifty DLM theme XSL trick in 2.6 that he was hoping to use to eliminate the hidden folders...
looks like 2.7
I tried to do this in 2.6 this evening and ran into problems, suggesting that this is too aggressive for this late 2.6 date and should be more carefully implemented for 2.7 in concert with further DLM enhancements, actual removal of SLM, ALM, etc.
Specifically, what *do* you do about the Everyone group? if the template is a member of no groups, and you're not using PAGS, then it seems you get new users who are members of no group and so are not in Everyone and so have unusable permissions.
on a side note -- this site
on a side note -- this site really needs a way to link my username in comments back to my profile and (preferably) my blog, so we can get real blogosphere style conversations going...