personal.xts 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2013
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
  13. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  14. <!--
  15. ===============================================================================================
  16. callMorphlet - Calls the appropriate morphlet using the passed in params which will return
  17. markup to be displayed or the expected results
  18. ===============================================================================================
  19. -->
  20. <xts:block
  21. id="callMorphlet"
  22. nodelist="requestParams,env, http, session, credential, cookies, header, user"
  23. processor="XSLT"
  24. type="exec"
  25. dependency="formlogic_init"
  26. condition=".[ /root/env/param[@name='controller_state'] != '' ]"
  27. mandatory="false">
  28. <xts:logicsheet path="logicsheets/portal.xsl"/>
  29. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  30. <xsl:stylesheet version="1.0"
  31. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  32. xmlns:dlgctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/controller-templates/"
  33. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  34. xmlns:req-params="http://developer.cognos.com/schemas/request/params"
  35. exclude-result-prefixes="xsl dlgctrl xtsext req-params">
  36. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  37. <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
  38. <xsl:template match="/">
  39. <xts:sequence>
  40. <dlgctrl:XTS2Request>
  41. <dlgctrl:target>/portal/addEntries/add_entries.xts</dlgctrl:target>
  42. <dlgctrl:stackName>addEntriesStack</dlgctrl:stackName>
  43. <req-params:param name="defaultTarget">/portal/preferences/personal.xts</req-params:param>
  44. <req-params:param name="titlePostfix"><xts:string id="IDS_PERS_TAB_GENERAL_CREDENTIAL"/></req-params:param>
  45. <req-params:param name="defaultSearchPath">/directory</req-params:param>
  46. <req-params:param name="showUsers">true</req-params:param>
  47. <req-params:param name="addEntriesUI"><xsl:value-of select="'members'"/></req-params:param>
  48. <req-params:param name="allowDuplicates"><xsl:value-of select="'false'"/></req-params:param>
  49. <req-params:param name="returnProperties">
  50. <req-params:property name="userName"/>
  51. </req-params:param>
  52. <req-params:param name="typeDialog">true</req-params:param>
  53. </dlgctrl:XTS2Request>
  54. </xts:sequence>
  55. </xsl:template>
  56. </xsl:stylesheet>
  57. </xts:block>
  58. <!--
  59. ===============================================================================================
  60. processReponse - Process the response from the callMorphlet block and either displays
  61. the markup or processes the results
  62. ===============================================================================================
  63. -->
  64. <xts:block
  65. id="processResponse"
  66. nodelist="output,http,env,system,user,morphletResponse,credential,cookies"
  67. path="/portal/addEntries/logicsheets/process_added_entries.xslt"
  68. processor="XSLT"
  69. dependency="callMorphlet"
  70. type="exec"
  71. condition=".[ /root/env/param[@name='controller_state'] != '' ]"
  72. mandatory="false">
  73. <xts:logicsheet path="logicsheets/presentation/dialog/controller-templates.xsl"/>
  74. <xts:logicsheet path="logicsheets/portal.xsl"/>
  75. </xts:block>
  76. <!--
  77. ===============================================================================================
  78. removeNotifications - Calls the delivery service to remove the user from all notification lists.
  79. ===============================================================================================
  80. -->
  81. <xts:block id="removeNotifications" processor="XSLT" type="exec" dependency="processResponse formlogic_init" condition=".[ /root/env/param[@name='remove_notifications'] != '' and not(/root/mode='addEntries')]" mandatory="false">
  82. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  83. <xsl:stylesheet version="1.0"
  84. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  85. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  86. xmlns:dls="http://developer.cognos.com/schemas/deliveryService/1"
  87. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  88. exclude-result-prefixes="send dls xsl xtsext">
  89. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  90. <xsl:template match="/">
  91. <xts:sequence>
  92. <xts:append>
  93. <send:request provider="deliveryService">
  94. <dls:deleteAllNotifications/>
  95. </send:request>
  96. </xts:append>
  97. </xts:sequence>
  98. </xsl:template>
  99. </xsl:stylesheet>
  100. </xts:block>
  101. <!-- Object type lookup table -->
  102. <!-- =============================================================================================== -->
  103. <xts:block id="classNames" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  104. <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>
  105. </xts:block>
  106. <xts:block id="getContent" processor="XSLT" type="exec" dependency="processResponse" condition=".[not(/root/mode='addEntries')]" mandatory="false">
  107. <xts:logicsheet path="portal/preferences/common/request/request.xslt"/>
  108. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  109. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  110. <xsl:stylesheet version="1.0"
  111. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  112. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  113. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  114. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  115. xmlns:rdr="http://developer.cognos.com/schemas/xts/rdr/"
  116. xmlns:xts="http://developer.cognos.com/schemas/xts/">
  117. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  118. <xsl:template match="/root">
  119. <rdr:Requests>
  120. <rdr:Request type="personal" mode="preferences">
  121. <rdr:searchPath>~</rdr:searchPath>
  122. </rdr:Request>
  123. <rdr:Request type="session" mode="preferences">
  124. <rdr:searchPath>~~</rdr:searchPath>
  125. </rdr:Request>
  126. <rdr:Request type="capabilities" mode="preferences">
  127. <rdr:searchPath>/capability//*[permission("execute")]</rdr:searchPath>
  128. </rdr:Request>
  129. <rdr:Request type="credentials" mode="preferences">
  130. <rdr:searchPath>~/credential</rdr:searchPath>
  131. </rdr:Request>
  132. </rdr:Requests>
  133. </xsl:template>
  134. </xsl:stylesheet>
  135. </xts:block>
  136. <!--
  137. genDisplayList:
  138. Queries CM for the details of every securityObject found in the credential
  139. object's policy list. The results are used to list credential objects.
  140. -->
  141. <xts:block id="genDisplayList" path="/portal/preferences/common/request/credentials/list.xslt" type="exec" mode="interpret" processor="XSLT" dependency="getContent" mandatory="false"
  142. condition=".[not(/root/mode='addEntries') and /root/*[local-name() = 'queryResponse']/*[4][local-name() = 'queryReply']/*[local-name() = 'credential']/*]">
  143. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  144. </xts:block>
  145. <!-- editCredentialList: Handles add, remove commands -->
  146. <xts:block id="editCredentialList" path="/portal/preferences/common/request/credentials/edit.xslt" mode="interpret" type="exec" processor="XSLT" dependency="genDisplayList" condition=".[not(/root/mode='addEntries')]" mandatory="false"/>
  147. <xts:block id="format"
  148. cacheControl="private, no-cache, no-store"
  149. mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init getContent classNames editCredentialList removeNotifications" condition=".[not(/root/mode='addEntries')]" mandatory="false">
  150. <xts:logicsheet path="portal/preferences/common/response/personal.xslt"/>
  151. <xts:logicsheet path="logicsheets/portal.xsl"/>
  152. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  153. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  154. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  155. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  156. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  157. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  158. <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
  159. <xts:logicsheet path="logicsheets/formlogic_lite.xslt"/>
  160. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  161. <xsl:stylesheet version="1.0"
  162. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  163. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  164. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  165. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  166. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  167. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  168. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  169. xmlns:st="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/specializetabs/"
  170. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  171. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  172. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  173. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  174. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  175. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  176. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  177. xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb"
  178. exclude-result-prefixes="xsl cm cml df dp pf bus dc utml xts xtsext lyt st cf cp">
  179. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  180. <xsl:variable name="mname" select="'preferences/personal.xts'"/>
  181. <xsl:variable name="user" select="/root/cm:queryResponse/cm:queryReply[1]/cm:account"/>
  182. <xsl:variable name="identity" select="/root/cm:queryResponse/cm:queryReply[2]/cm:session/cm:identity"/>
  183. <xsl:variable name="capability" select="/root/cm:queryResponse/cm:queryReply[3]"/>
  184. <xsl:variable name="credential" select="/root/cm:queryResponse/cm:queryReply[4]"/>
  185. <xsl:variable name="credentialExists" select="$credential/cm:credential/cm:searchPath"/>
  186. <xsl:variable name="noUserProfile" select="$user/cm:modificationTime=''"/>
  187. <xsl:variable name="isNamedAccountReadOnly" select="(not(contains($user/cm:permissions,'write')) and ($is-named='1'))"/>
  188. <xsl:variable name="has_read_permission" select="contains(concat(' ', $user/cm:permissions, ' '), ' read ')"/>
  189. <xsl:variable name="has_traverse_permission" select="contains(concat(' ', $user/cm:permissions, ' '), ' traverse ')"/>
  190. <xsl:variable name="has_write_permission" select="contains(concat(' ', $user/cm:permissions, ' '), ' write ')"/>
  191. <xsl:variable name="canManageOwnDataSourceSignons" select="boolean(/root/session/param[@name='capabilities']/canUsePersonalDataSourceCredentials)"/>
  192. <xsl:variable name="showDataSourceCredentialsSection" select="$canManageOwnDataSourceSignons and $has_read_permission and $has_traverse_permission"/>
  193. <pf:variables/>
  194. <pf:modalVariables/>
  195. <pf:serialize-xml/>
  196. <xsl:template match="/root">
  197. <xsl:variable name="browserTitle">
  198. <xts:string id="IDS_PREFERENCES"/>
  199. </xsl:variable>
  200. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  201. <dp:meta>
  202. <pf:meta/>
  203. </dp:meta>
  204. <dp:script>
  205. <pf:help context="HID_PERSONALIZE"/>
  206. <!-- Need to statically include js file for IE -->
  207. <script src="{$webRoot}/fragments/fragments.js"/>
  208. <script src="{$webRoot}/ps/j2html/js/j2html.js"/>
  209. <script src="{$webRoot}/ps/cogadmin/js/extension/DataSourceCredentials.js"/>
  210. <script src="{$webRoot}/ps/cogadmin/js/fragmentEmbedder.js"/>
  211. <script>
  212. var fragDef = {};
  213. fragDef.gateway = "<xsl:value-of select="xtsext:javascriptencode($gateway)"/>";
  214. fragDef.webRoot = "<xsl:value-of select="xtsext:javascriptencode($webRoot)"/>";
  215. fragDef.skinRoot = "<xsl:value-of select="xtsext:javascriptencode($skin_root)"/>";
  216. var fragmentEmbedder = new FragmentEmbedder(fragDef);
  217. </script>
  218. </dp:script>
  219. <utml:form name="pform" method="post" action="{$gateway}">
  220. <utml:read-only><xsl:value-of select="$isNamedAccountReadOnly"/></utml:read-only>
  221. <utml:input type="hidden" name="ps_nav_op" value="" utml:update="false"/>
  222. <utml:input type="hidden" name="ifrmcmd" value="save" utml:update="false"/>
  223. <utml:input type="hidden" name="m_dataSourceCredentialsToDelete" utml:update="true"/>
  224. <utml:input type="hidden" name="credential_list" utml:update="false">
  225. <xsl:variable name="passport" select="/root/credential/param[@name='CAM']/*[local-name() ='CAM']/*[local-name() = 'CAMPassport']/*[local-name() = 'id']"/>
  226. <xsl:if test="/root/list/*">
  227. <xsl:attribute name="value">
  228. <xsl:variable name="markup">
  229. <xsl:apply-templates select="/root/list/*" mode="markup"/>
  230. </xsl:variable>
  231. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($markup),true()))"/>
  232. </xsl:attribute>
  233. </xsl:if>
  234. </utml:input>
  235. <dp:header div="div">
  236. <dp:title><xsl:value-of select="$browserTitle"/></dp:title>
  237. </dp:header>
  238. <df:personalizeTabs select="personal"/>
  239. <dp:description>
  240. <xts:string id="IDS_PERS_TAB_PERSONAL_INTRO"/>
  241. </dp:description>
  242. <!-- Body -->
  243. <rdb:preferences mode="preferences"/>
  244. <script>
  245. fragmentEmbedder.embed('/fragmentproducer/cogadmin/policy/user_capabilities','capabilitiesFrag');
  246. <xsl:if test="$showDataSourceCredentialsSection">
  247. var paramInfo = {};
  248. paramInfo.userPath = "~";
  249. paramInfo.htmlForm = pform;
  250. paramInfo.canWrite = "<xsl:value-of select="$has_write_permission"/>";
  251. var dsParams = com.cognos.admin.extension.DataSourceCredentials.generateDataSourceParams(paramInfo);
  252. fragmentEmbedder.embed('/fragmentproducer/cogadmin/userpreferences/datasourcecredentials','datasourceCredententialsFrag',dsParams);
  253. </xsl:if>
  254. fragmentEmbedder.loadFragments(true);
  255. </script>
  256. <dp:footer div="div">
  257. <xsl:if test="$isNamedAccountReadOnly != 'true'">
  258. <df:button df:id="IDS_OK" utml:validate="true" df:style="submit"/>
  259. </xsl:if>
  260. <xsl:choose>
  261. <xsl:when test="$isModal">
  262. <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:processModalCommand('cancel')" onclick="{$dc-confirm-cancel}"/>
  263. </xsl:when>
  264. <xsl:otherwise>
  265. <df:button df:id="IDS_CANCEL" df:style="back-url" onclick="{$dc-confirm-cancel}"/>
  266. </xsl:otherwise>
  267. </xsl:choose>
  268. </dp:footer>
  269. </utml:form>
  270. </dp:page>
  271. </xsl:template>
  272. <pf:gen-icon/>
  273. </xsl:stylesheet>
  274. </xts:block>
  275. <!--
  276. ===============================================================================================
  277. debug - display debug information
  278. ===============================================================================================
  279. -->
  280. <xts:block id="debug" dependency="format processResponse" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  281. <!-- get the debug logic sheet -->
  282. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  283. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
  284. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  285. <xsl:template match="/">
  286. <dbg:dumpxml select="/root"/>
  287. </xsl:template>
  288. </xsl:stylesheet>
  289. </xts:block>
  290. </xts:morphlet>