UpdateAccesscontrol.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. =================================================================
  4. * Licensed Materials - Property of IBM
  5. * (c) Copyright IBM Corp. 2003, 2010. All rights reserved.
  6. *
  7. * US Government Users Restricted Rights - Use, duplication or
  8. * disclosure restricted by GSA ADP Schedule Contract with IBM
  9. * Corp.
  10. *
  11. * DISCLAIMER OF WARRANTIES. The following [enclosed] code is
  12. * sample code created by IBM Corporation. This sample code is
  13. * not part of any standard or IBM product and is provided to you
  14. * solely for the purpose of assisting you in the development of
  15. * your applications. The code is provided "AS IS", without
  16. * warranty of any kind. IBM shall not be liable for any damages
  17. * arising out of your use of the sample code, even if they have
  18. * been advised of the possibility of such damages.
  19. *
  20. =================================================================
  21. -->
  22. <request
  23. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  24. xsi:noNamespaceSchemaLocation="PortalConfig_8.0.0.xsd"
  25. type="update"
  26. create-oids="true">
  27. <!-- Sample for setting access control on resources.
  28. NOTE: This sample file needs to be modified before execution.
  29. Update the file specifying existing users and groups.
  30. NOTE: This sample expects that a page with the unique name 'ibm.portal.SamplePage' exists.
  31. For example the DeployPortlet.xml sample creates such a page.
  32. -->
  33. <portal action="locate">
  34. <!-- Virtual resources allow you to set access control on all resources of a certain type.
  35. The following example assigns the administrator privileges on all user groups -->
  36. <virtual-resource action="update" domain="rel" name="USER_GROUPS">
  37. <access-control>
  38. <role actionset="Administrator" update="set">
  39. <mapping subjectid="wpsadmin" subjecttype="USER" update="set"/>
  40. </role>
  41. </access-control>
  42. </virtual-resource>
  43. <!-- Set access control on a portlet - the portlet is not redeployed.
  44. The same syntax can be used to set access control on a new deployed portlet -->
  45. <web-app action="locate" uid="com.ibm.wps.portlets.welcome">
  46. <portlet-app action="locate" uid="com.ibm.wps.portlets.welcome.1">
  47. <access-control>
  48. <!-- The user role should not automatically propagate to portlets in this application. -->
  49. <role-block type="propagation" actionset="User"/>
  50. </access-control>
  51. <portlet action="update" active="true" name="Welcome Portlet">
  52. <access-control>
  53. <!-- Remove all role blocks on this resource. -->
  54. <role-block type="none"/>
  55. <role actionset="Administrator" update="set">
  56. <!-- depending on your directory used, the DN must be changed -->
  57. <mapping subjectid="uid=wpsadmin,o=defaultwimfilebasedrealm" subjecttype="USER" update="set"/>
  58. </role>
  59. <role actionset="Privileged User" update="set">
  60. <mapping subjectid="all authenticated portal users" subjecttype="USER_GROUP" update="set"/>
  61. </role>
  62. <role actionset="User" update="set">
  63. <mapping subjectid="anonymous portal user" subjecttype="USER" update="set"/>
  64. </role>
  65. </access-control>
  66. </portlet>
  67. </portlet-app>
  68. </web-app>
  69. <!-- Set access control on a page - the layout of the page is not modified.
  70. The same syntax can be used to set access control on a new created page. -->
  71. <content-node action="update" uniquename="ibm.portal.ssa.SamplePage">
  72. <access-control>
  73. <!-- The manager role should not be inherited automatically from parents of this page. -->
  74. <role-block type="inheritance" actionset="Manager"/>
  75. <!-- The manager role is set explicitly on this page. -->
  76. <role actionset="Manager" update="set">
  77. <mapping subjectid="wpsadmin" subjecttype="USER" update="set"/>
  78. </role>
  79. <role actionset="User" update="set">
  80. <mapping subjectid="anonymous portal user" subjecttype="USER" update="set"/>
  81. </role>
  82. </access-control>
  83. </content-node>
  84. </portal>
  85. </request>