Need to remove 'My Account' and 'Content/Layout' from Top left ...

I'm trying to limit the 'My Account' and 'Content/Layout' links from appearring for a specific role. I have applied the logic to the nested-tables.xls to not show the 'email', 'calendar' and 'groups' icons for the role in question.
I have tried the same logic in the htlm.xls file in the CHeader directory with no luck. As anyone been able to set this up?

Thanks
Bruce

0
No votes yet

Comment viewing options

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

Upper links

Those are actually controlled from within the uPortal.jar file located in $CP_WEBINF/lib

backup your original uPortal.jar file
cp $CP_WEBINF/lib/uPortal.jar /backups
copy the .jar file to a temp location like /tmp
run jar xvf uPortal.jar from /tmp
this will extract the contents
rm uPortal.jar ('cause you'll create it again when you're done)
navigate down to /org/jasig/portal/channels/CHeader and edit the html.xls file there.
When you're done navigate back to /tmp
run jar cvf uPortal.jar *
this will pack everything back up nice and neat. If you didn't remove the uPortal.jar before, it will get packed up in this new one, doubling the size.
cp uPortal.jar $CP_WEBINF/lib
bounce your webserver
test it out.

Good luck
-Jon

Upperlinks

I added the code and now get this error:
XSLT.getTemplates():Prefix must resolve to a namespace: cp; SystemID: jar:
file:/opt/luminis/webapps/luminis/WEB-INF/lib/uPortal.jar!
/org/jasig/portal/channels/CHeader/html.xsl; Line#: 46; Column#: 107

This points to a varible parm I inserted to do a choose statement which works for the email,calendar icons not showing.

Can I but this in the html.xls file?

Here is the code I added:

It's easier this way...

Hey Jon

You don't have to got to so much effort...

It can all be done in nested-tables.xsl


<!-- Add a search for the specific role at the start of nested-tables.xsl... -->
<xsl:variable name="isPspCasualBrowserRole">
    <xsl:for-each select="/layout/cp:cpInfo/cp:cpProperty[@name='pdsRole']/child::*">
	<xsl:if test=". = 'pg_casual'"><xsl:value-of select="'true'" /></xsl:if>
    </xsl:for-each>
</xsl:variable>

...
...
...
...

		
                    <!-- ****** Search for the next line, then add the [xsl:if] underneath ******* -->
                    <xsl:when test="not(//focused) and not($frm='backLinked') and not($utf!='')">
                    	<!-- *** Add the following line... -->
                        <xsl:if test="not($isPspCasualBrowserRole='true')">

                            <TD ALIGN="RIGHT" nowrap="">
                                <SPAN CLASS="uportal-text-small">
                                    <xsl:copy-of select="/layout/header/channel[@name='Header']"/>
                                </SPAN>
                            </TD>

                            <TD><IMG SRC="{$mediaPath}/{$skin}/controls/app_divider.gif" WIDTH="2" HEIGHT="36" HSPACE="4"/></TD>

                            <TD WIDTH="100%" NOWRAP="">
                                <SPAN CLASS="uportal-channel-text" ID="welcome">
                                    <xsl:copy-of select="channel[@name='Login']"/> 
                                </SPAN>
                            </TD>

                        <!-- *** Close the [xsl:if] -->
                        </xsl:if>
                    </xsl:when>
 

This should do the trick nicely for the 'pg_casual' role (we've created that role at Nottingham) - It also hides the "Welcome [User Name] bit, but you can move the closing [xsl:if] tag up a bit to fix that. Give me a shout if you're having problems with this.

Hope this helps
David.

Perfect!

David, That did the trick...
I already had the variable set (for the removal of the emial, groups, and calendar icons) in the nested-tables file.
I added the if statement in the location you suggested and BINGO..

Thanks...

Need more information

Hey Bruce,

I am also trying to remoe content layout link for certain role. I too saw exact error you mentioned. I kind of got lost on Davids suggestion as nested-tables file deals the content on the top right menu and content layout or my account link is on top left corner. How would nested-tables.xsl could take care of the top left cotnent? could you please provide you code smaple to do so please......

Thanks a lot for you time and help.

Anitha

The code I used....

In the nested-tables.xls file I placed the following:







right below the section.

Then find the section:




















 


Restart Luminis.....

Let's try it again....

The system keeps stripping the code.....

How can I post the code?

Try this

Replace all < with &lt; and all > with &gt; with "Search & Replace" in your favorite text editor, then copy resultant code to LDN


Wrap in:
<pre><code>
code here
</code></pre>

...for nice coding/indenting etc.

fyi: configman

BTW: If you want to remove just the "Change Password" link for all roles, you can do this with the following command:

configman -s security.login.allow.password.change false

How about guest only?

can this be done on guest account only?

help with conditional role based display for content layout link

Hello All,

As a part of our admissions/applicant self service, we were planning on implementing a conditional/role based icon display for applicants. We didn’t want the applicants to have access to the “Groups” and “Email” icons and also we don’t want to give the ability to add channels to applicants. I think I am pretty close to solving the role based icon display for applicants but I have no clue about how to proceed with the “Content Layout” link. We want the “Content Layout” link to appear for everybody on campus but not to “applicants”. I was looking at your posts in lumdev and was wondering if you could guide me in that process. I see that you made a change in nested-tables.xsl file but I am not very clear about the changes. Do guys you have a document that explains the steps that you have taken to accomplish this?

Thank you,

-Shiva

A slight change in newer versions

As written in this other article: http://www.lumdev.net/node/790,

in III.3.3 and IV, you need to modify you stylesheet declaration to match the one in nested-tables. Then, modify the foreach loop from this:

<xsl:for-each select="/layout/cp:cpInfo/cp:cpProperty[@name='pdsRole']/child::*">

to this:

<xsl:for-each select="cpExtension:getCpInfo()//cp:cpProperty[@name='pdsRole']/child::*">

Need some help

I'm trying to implement this for our applicant role. Specifically, I want to remove the Email icon for anyone with the "applicant" role. We're using Luminis IV.0.2.

I've succeeded in removing the email icon for all users! Oops.

here's what I'm doing.

editing /opt/luminis/custom/classic/customIcons.xsl

a) changed stylesheet to:
<xsl:stylesheet version="1.0"
xmlns:cp="http://www.campuspipeline.com"
xmlns:dlm="http://www.uportal.org/layout/dlm"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:cpExtension="com.pipeline.web.WebUtil"
exclude-result-prefixes="dlm cp">

b) added this code, right after <xsl:include href="Channel.properties"/>

<xsl:variable name="isApplicant">
<xsl:for-each select="cpExtension:getCpInfo()//cp:cpProperty[@name='pdsRole']/child::*">
<xsl:if test=". = 'applicant'"><xsl:value-of select="'true'" /></xsl:if>
</xsl:for-each>
</xsl:variable>

c) changed the code which displays the Email icon to:

<xsl:if test="not($isApplicant='true')">
<td align="center" nowrap=""><a href="{$iHref}" ...
</xsl:if>

d) do a deployskintemplate and a stopcp/startcp.

Can anyone see what I'm doing wrong? Again, I just want to disable the email icon for the "applicant" role.

Thanks!

I need help with Removing My Account link too...

I just started going through some old posts but I feel like there is some pieces missing. I am on 4.0.2 as well and would really like some help with this.

I found the CHeader.xsl file and I assume I should use the same logic I used to control the Icons, but I am not sure if it will work. Any feedback?