Role based icons

We are implementing a new email system for students only. Employees will continue to use our existing email client. We were hoping that someone could help us figure out how to accoplish this.

For the Microsoft Live transition, there are two scenarios they would like us to accommodate in Luminis:

During the transition:

If a STUDENT role: display Live Mail icon and Sun Webmail icon (current icon)
If an EMPLOYEE role: display Sun Webmail icon

After the transition:

If a STUDENT role: display Live Mail icon
If an EMPLOYEE role: display Sun Webmail icon

Questions:

* Can this be done?
* How will icons display for Employees who are also Students?
o Would we need an additional role for those with dual roles?
o Or, will any icon defined to display for Students automatically be added to an Employee's layout?
* Is the role based layout template what defines icon display?

Thanks,
Denise

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Info

Denise, this is possible, but it would either need new roles for students, or a change in the icon evaluation logic from before and after the transition. If you had a couple of new roles, student_sun_icon and student_live_icon, then you could base the icon display logic on those roles, and just move people in and out of them as you transition them.

The employee case is easy, just always show them the Sun icon.

Since you have roles for the Live icon, which are different than the Sun icon (Employee), then Employees who are students would see both, assuming you want that behaviour.

There are some decent articles on LumDev in setting up the custom icons, here's one: http://www.lumdev.net/node/3055#comment-8182

IconEvaluator

I don't think I'm answering your whole question, but I hope this sends you in the right direction. the IconEvaluator is pretty easy to program. Look in the document lp40100uicstg.pdf (you may have a differe LP#, but the uicstg is the Sungard Manual manual you want.

Within that document, you should see some java examples for evaluating different icons. A search of the pdf on: extends IconEvaluator
should get you the text code that looks similar to:

import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Element;
import org.jasig.portal.channels.cpicons.IconEvaluator;
import campuspipeline.uportal.dlm.provider.ExtensionClass;

public class CLASSNAME extends IconEvaluator {

Then you can evaluate the roles with something similar to (customize that to your choices you listed at the beginning of this article):

String[] userRoles = ExtensionClass
.getLDAPAttributes("pdsRole");
for (int i = 0; i < userRoles.length; i++) {
if ( userRoles[i].equalsIgnoreCase("faculty") // These are the only roles we want to have the Email Icon
|| userRoles[i].equalsIgnoreCase("alumni")
|| userRoles[i].equalsIgnoreCase("employee")
|| userRoles[i].equalsIgnoreCase("student")
)

I hope this helps. Recently, somebody wrote out a bunch of code that was tremendously helpful. Though I'd return the favor to the community.

The ExtensionClass

Using the ExtensionClass has created some problems for us - portal icons would randomly disappear. We decided to create our own way of SSO-ing users to their respective accounts. We pointed the email icon to a JSP page which contains logic to determine the primary role of a user based on an LDAP attribute. Depending on that role the page then redirects the user to either our internal email or Outlook Live. Please let me know if you would like me to post some of our JSP code.

Vladimir

Re: The ExtensionClass

Yes, please post the code.

Thanks,
Russ

try not to use ExtensionClass

Hi

The ExtensionClass methods should not be used anymore, see FAQ 1-2KMFH6 on the support site, it actually references a posting on here. There are some issues around cacheing with the ExtensionClass, which were resolved for us when we followed the recommendations in that FAQ.

David

did you get this resolved?

did you get this resolved?

Syndicate content