3 Replies Latest reply on Mar 22, 2004 4:05 PM by peter_y_wang

    Configure html pages and permisions

    peter_y_wang Newbie

      Hi,
      I made the following changes in menu-block-service.xml and want every one to see html links in Main menu-block, but there is nothing happen. The home link can be seen in Admin group but there is no peterue.html link. In other group or logout state none of these lines can be seen.

      Can anyone help?

      in menu-block-service.xml :

      .
      .
      .









      <!-- ************* -->
      <!-- * ANONYMOUS * -->
      <!-- ************* -->

      <!-- displays any html content -->
      <permission component-pattern="html::" instance pattern=".*::" level="READ"/>
      .
      .
      .

        • 1. Re: Configure html pages and permisions
          peter_y_wang Newbie

          My code in menu-block-service.xml:

          <attribute name="Before">
           <menu>
           <item title="Home" url="index.html" description="Back to the home page."/>
           <item title="peterue" url="peterue.html" description="personal page"/>
           </menu>
           </attribute>
           <attribute name="Security">
          
           <security>
           <!-- ************* -->
           <!-- * ANONYMOUS * -->
           <!-- ************* -->
          
           <!-- displays any html content -->
           <permission
           component-pattern="html::"
           instance-pattern=".*::"
           level="READ"/>
          .
          .
          .
           </security>


          • 2. Re: Configure html pages and permisions
            jae Master

            i believe you will have to clear the persisted security settings from the database.

            delete from nuke_services_attributes where pn_aid='Security'


            from what i have seen going through debug sessions, it appears that what ever is contained in the db completely overrides any new or changed settings in the xml file.


            • 3. Re: Configure html pages and permisions
              peter_y_wang Newbie

              Yes. It works now. I can see additional items in menu-blocks and can see Home (html page link) in user and logout state.

              But I still can not see the second peterue.html from html links in menu-blocks. I have checked the location of peterue.html file and it is in the same directory as index.html. Is there any setting I have not configured? e.g. jmx-console?

              cheers.


              The following is the updated menu-block-service.xml:

              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE server>
              
              <server>
               <mbean
               code="org.jboss.nukes.core.modules.core.blocks.MenuBlock"
               name="nukes.blocks:name=menu"
               xmbean-dd=""
               xmbean-code="org.jboss.nukes.component.NukesMBean">
               <constructor>
               <arg type="boolean" value="true"/>
               </constructor>
               <depends>nukes.modules:name=core</depends>
               <xmbean>
               <attribute name="Title">Main Menu</attribute>
               <attribute name="Side">0</attribute>
               <attribute name="Weight">0</attribute>
               <attribute name="Before">
               <menu>
               <item title="Home" url="index.html" description="Back to the home page."/>
               <item title="peterue" url="peterue.html" description="Back to the home page."/>
               </menu>
               </attribute>
               <attribute name="Security">
               <security>
              
               <!-- ************* -->
               <!-- * ANONYMOUS * -->
               <!-- ************* -->
              
               <!-- displays any html content -->
               <!--permission
               component-pattern="html::"
               instance-pattern=".*::"
               level="READ"/-->
              
               <permission pattern=".*:.*:" level="READ"/>
               <permission pattern="module:(journal|downloads|faq|bb):main" level="READ"/>
               <permission group="Users" pattern=".*:.*:" level="READ"/>
               <permission group="Users" pattern="module:(youraccount|journal|downloads|faq|bb):main" level="READ"/>
               <permission group="Users" pattern="module:user:(logout|memberlist)" level="READ"/>
               <permission group="Admins" pattern=".*:.*:.*" level="ADMIN"/>
               </security>
               </attribute>
               </xmbean>
               </mbean>
              </server>