5 Replies Latest reply on Aug 4, 2006 3:04 PM by bdaw

    Issue in defining role based category display in JBOSS forum

    rahulm

      I am using JBOSS forum 2.2 sp1 binary in JBOSS portal 2.2 sp1. In my application there are different roles like marketing and sales.
      There are different form categories defined like marketing-category and sales-category.
      I want to give access to these categories to specific roles.
      A person having marketing role should only able to create forum and post topics in that specific category only.

      I tried adding the security permissions in jboss-portlet.xml like

      /marketing-category

      <permission-name>AddForumInCategory</permission-name>
      <role-name>Marketing</role-name>


      <permission-name></permission-name>
      <role-name>sales</role-name>


      It does not seem working...
      Am I missing something????
      Please help

        • 1. Re: Issue in defining role based category display in JBOSS f
          unibrew

          http://wiki.jboss.org/wiki/Wiki.jsp?page=ForumsPortletInPortal22DevelopementStatus
          Should help :-).

          ------------------------
          Ryszard Kozmik
          JBoss Labs Team

          • 2. Re: Issue in defining role based category display in JBOSS f
            rahulm

            Thanks for the quick reply...
            I did add the entries in to portlet.xml like
            <security-role-ref>
            <role-name>ForumsAttachments</role-name>
            <role-link>Marketing</role-link>
            </security-role-ref>
            <security-role-ref>
            <role-name>ForumsUser</role-name>
            <role-link>Marketing</role-link>
            </security-role-ref>

            I also added entry to jboss-portlet.xml like
            /Marketing

            <permission-name>AddForumInCategory</permission-name>
            <role-name>Marketing</role-name>


            Now I can view all the categories which i do not want.
            For a marketing role it should anly show me the marketing-category forum and posts.
            How can I achieve that?

            • 3. Re: Issue in defining role based category display in JBOSS f
              rahulm

              This is the entry I added to jboss-portlet.xml


              /Marketing

              <permission-name>AddForumInCategory</permission-name>
              <role-name>Marketing</role-name>



              is it fine or i have to add more entries to achieve the functionality.

              • 4. Re: Issue in defining role based category display in JBOSS f
                rahulm

                this is the entry in jboss-portlet.xml to give permission to marketing role only to the Marketing forum.


                /Marketing

                <permission-name>AddForumInCategory</permission-name>
                <role-name>Marketing</role-name>



                It is still not allowing marketing role users to post reply to this specific category.

                • 5. Re: Issue in defining role based category display in JBOSS f
                  bdaw

                  Current Forums Portlet is not under development, and has very simplified security implementation (as described in wiki). You cannot setup role based access to specified categories.

                  What is misleading is that security stuff in jboss-portlet.xml is not used and should be removed. Only settings in portlet.xml are used. Sorry for that...

                  Currently whole Forums Portlet is being rewritten in JSF and should be released soon.

                  So what you can do is implementing by yourself as it is OSS. You can find all security checks in:

                  org.jboss.portlet.forums.ForumsPortlet

                  What you look for is:

                  ForumsTools.hasPermission(.....)

                  method call.

                  Or wait for new shining Forums Portlet JSF implementations with pluggable security model ;)