If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Hide 'Set Properties' & 'More' links

Started by tupac_rd, 28 Jan 2010 10:57:27 AM

Previous topic - Next topic

tupac_rd

Hi All,

Is there a way to Hide 'Set Properties' & 'More' links in Cognos Connection for a set of users or a group.

Thanks
dd


tupac_rd

Thanks for the reply Paul. I knew about that list, and these 2 are not in there. Just wanted to see if there is some other way to hide the 'Set Properties' and 'More' links.....

CognosPaul

To the best of my knowledge there's no set way to do it. Even users with read only privileges can still select the two options. If it's absolutely essential you might be able to modify the xslt files that control the generation of the rows. The hard part would just be identifying which file to modify. Once you know that it's simply a matter of copying the whitelist code from the other xslt files, like presentation.xslt.

This sounds like an interesting problem. I'll check it out on Monday when I have a little bit of free time.

tupac_rd

Wow, Thanks for some details Paul. I never knew that there is a way to find the whitelist code, ofcourse looks like its not so easy, but atleast there is a way. If at all you come to know about a way to hide Set Properties and More links, please share with us. I will try to figure out with what you have mentioned, but I highly doubt I will be able to figure it out...

CognosPaul

#5
I've discovered how to prevent the Set Properties from rendering in the portal.

In the system.xml file add <SET_PROPERTIES_BUTTON show ="Administrators"/> to the <param name="ui_hide">

In ..\c8\templates\ps\logicsheets\presentation\main\presentation.xsl

Look for the string <!-- CRN Object -->  There should be two of them. Under the first one, and under the <out:otherwise> is where the template for the properties button is called. You need to wrap the call:template with the white list code as follows:

<out:if test=" not(contains($ui_black_list, ' SET_PROPERTIES_BUTTON ')) ">
   <xsl:call-template name="renderAction">
      <xsl:with-param name="onclick">actions('{xtsext:javascriptencode(string($obj-name))}', '{$obj-class}', '{xtsext:javascriptencode(string($obj-path))}','properties_general.xts');</xsl:with-param>
      <xsl:with-param name="icon" select="'action_properties.gif'"/>
      <xsl:with-param name="tooltip" select="'IDS_PROPERTIES'"/>
   </xsl:call-template>
</out:if>

I strongly recommend saving and backing up both files before doing this. I have not thoroughly tested this, nor is this something that IBM will support. As this only hides the icon from the portal, the users will still be able to get to the Set Properties via the More link. I'll see if I can figure out how to hide that next but I can't promise I'll be able to get back today.


EDIT: I've tested this on 8.4.1. From what I've seen it's almost identical to 8.4. Your results may vary (wrong things being hidden, Cognos service not starting, the world imploding into a black hole, etc) if you try this on previous versions.

CognosPaul

#6
Hiding the More is just as easy.

In system.xml add <MORE_LINK show ="Administrators"/> to the <param name="ui_hide">


In ..\c8\templates\ps\logicsheets\presentation\main\presentation.xsl look for the second <!-- CRN Object --> and replace the code with:

<!-- CRN object -->
<out:otherwise>
<out:if test=" not(contains($ui_black_list, ' MORE_LINK ')) ">
<a href="#">
<!--  For shortcuts we always use the current object's class, name, and path to launch the "Actions" dialog -->
<out:attribute name="onClick">actions('<out:value-of select="xtsext:javascriptencode(string($obj-name))"/>', '<out:value-of select="$obj-class"/>','<out:value-of select="xtsext:javascriptencode(string($obj-path))"/>','actions.xts', null, '<out:value-of select="xtsext:javascriptencode(string($location))"/>');</out:attribute>
<xts:string id="IDS_ACT_MORE"/>
</a>
</out:if>
</out:otherwise>

Back up the files before you modify them, Cognos will not load if there is a single character out of place. Also, please do some tests to make sure that this works properly and doesn't break anything else. I spent a grand total of 30 seconds testing this so I might have missed something.


EDIT: Added code tag to prevent SMF from screwing up the xsl tags.

tupac_rd

Holy Canoli!!!!

Thankyou very much for the detailed response Paul. I will definitely try it out only on the Sandbox first and then go ahead in other environments....We are using 8.4, so hope it should not be an issue....

Thanks again
dd

tupac_rd

Hi Paul,

I tried to do the changes to the xsl file, but the issue I am having is the 'More' link gets hidden only on the main page, once I click on a folder under Public Folders, I can again see it for the reports.... and other folders... Not sure what I might be doing wrong. Anyways, I will try to do it on 8.4.1 and see if its a bug in 8.4 and all the hotfixes we have installed....

Thanks again
dd

CognosPaul

#9
Hi Tupak,

It's probably not a bug on your end. As I said, I didn't test it thoroughly. Are the properties reappearing on the other pages as well?

It seems like the root directory is rendered differently from the other folders. I'll do some more research next time I get some free time. Unfortunately it's looking like I'll only have some time early next week. In the mean time, if you do a search for IDS_ACT_MORE in that page you'll find every occurrence. You can try wrapping those sections in the
   <out:if test=" not(contains($ui_black_list, ' MORE_LINK ')) ">
   </out:if>
tags.

Good luck!

tupac_rd

Hi Paul,

Thanks for the quick reply again.

I tried to do the steps you mentioned but no luck. Proabably I am not doing it right.

Thanks
dd

tupac_rd

Hi Paul,

do you edit xsl files using any specific editor...

CognosPaul

#12
Hi Tupak,

I use Notepad++ to modify these files. The ability to expand and collapse groups of code is invaluable in finding exactly where you need to modify.

I haven't forgotton that it only effects the root directory, I still haven't had the time to play, but it's looking like it might be next week. The only thing I can suggest in the meantime is to keep experimenting with the XSL. The feeling of success is incomparable, especially after a task as difficult as this.

CognosPaul

Are you still having this problem? I just had a chance to check on the 8.4.1 test environment where I made these changes. I'm not seeing the properties or More buttons for anything now. Can you check that the more link section is set like this:

<!-- CRN object -->
<out:otherwise>
<out:if test=" not(contains($ui_black_list, ' MORE_LINK ')) ">
<a href="#">
<!--  For shortcuts we always use the current object's class, name, and path to launch the "Actions" dialog -->
<out:attribute name="onClick">actions('<out:value-of select="xtsext:javascriptencode(string($obj-name))"/>', '<out:value-of select="$obj-class"/>','<out:value-of select="xtsext:javascriptencode(string($obj-path))"/>','actions.xts', null, '<out:value-of select="xtsext:javascriptencode(string($location))"/>');</out:attribute>
<xts:string id="IDS_ACT_MORE"/>
</a>
</out:if>
</out:otherwise>
and the set properties section is set up like:
<!-- CRN Object -->
<out:otherwise>
<out:if test=" not(contains($ui_black_list, ' SET_PROPERTIES_BUTTON ')) ">
<xsl:call-template name="renderAction">
<xsl:with-param name="onclick">actions('{xtsext:javascriptencode(string($obj-name))}', '{$obj-class}', '{xtsext:javascriptencode(string($obj-path))}','properties_general.xts');</xsl:with-param>
<xsl:with-param name="icon" select="'action_properties.gif'"/>
<xsl:with-param name="tooltip" select="'IDS_PROPERTIES'"/>
</xsl:call-template>
</out:if>

uuiioo

Hi Guys,

Do you have any progress on this topic? Recently I am facing the similar case. This case is
* to hide action items by user group in navigator (I created a page)  but not in folder view
* the wanted hide items are 'set properties', ' run with options' and 'more link'

I know Paul provided work around for the 'set properties' and 'more link'. I tried it. The thing is I can hide the 'more link' in
folder view (public folder, personal folder) but it is still displayed in the navigator part. And I did not make the 'set properties'
solution work in folder view or navigator. I may did something wrong. Could you provide me some suggestions?

Paul,

Could you give me some ideas about the solution you provided? I can follow you solution and use your code but I want to know
the meaning of your code. I do not want to waste your time to explain the code just give me a direction. Sorry I am not good at
the Cognos customization, xml and xsl. 

Thanks in advance.

uuiioo

Hi Guys,

I found a way to solve my case partly.

modify the system.xml under Program Files\cognos\c8\templates\ps\portal to add the exclude part.

here is one example

<object class="report" exclude="customview"> >
   <action name="run_options"/>
   <action name="edit"/>
   <action name="schedule"/>
   <action name="run_once"/>
   <action name="previous_versions"/>
   <action name="run_history"/>
   <action name="customview"/>
   <action name="shortcut"/>
   <action name="add_alert"/>
   <action name="remove_all_alerts"/>
</object>

this solution  can help me to hide the customview in navigator. And the customview is still available in folder view. It is good enough for my request
because I can hide the folders with permission setting to allow admin only.
the problem is I can use this to hide any action item in the list but the 'set properties' and 'more' are not on the list. I do not know the action name
of them. I am not sure can I hide others which are not on the list. Anyway, I need to know the action names first so I can try.
If you know the action names of 'property' or 'more' let me know.

Thanks

CognosPaul

Hi uuiioo,

Cognos generates the HTML of the page based on the XTS files. The following is the example I gave previously:
<!-- CRN object -->
<out:otherwise>
   <out:if test=" not(contains($ui_black_list, ' MORE_LINK ')) ">
      <a href="#">
         <!--  For shortcuts we always use the current object's class, name, and path to launch the "Actions" dialog -->
         <out:attribute name="onClick">actions('<out:value-of select="xtsext:javascriptencode(string($obj-name))"/>', '<out:value-of select="$obj-class"/>','<out:value-of select="xtsext:javascriptencode(string($obj-path))"/>','actions.xts', null, '<out:value-of select="xtsext:javascriptencode(string($location))"/>');</out:attribute>
         <xts:string id="IDS_ACT_MORE"/>
      </a>
   </out:if>
</out:otherwise>


When the page generates it will test your permissions against the ui_black_list. It will look for MORE_LINK, and if it appears it will check all of the roles with permission to see it. If you have permission it will continue on to the <a href... if not it will simply skip the section. It seems that another file controls the generation of the navigator. I'll have to look for it.

uuiioo

Hi Paul,

thank you for your reply  ;D

cognoslearner1

Hi Paul,

The way you suggested will hide UI to all the users . Is there a way to hide for some users and groups ?

Thanks,
Cognoslearner1

coldchickens

Have to open old wounds here - cannot find any way to get rid of the "more..." link within the navigator portlet.

Adding items to the black list works quite well for cognos connection but buggered if I can find anything relating to the navigator portlet.

Been a few years now, anyone have some new info?