1 Reply Latest reply on Dec 7, 2007 4:58 AM by Ryszard Kozmik

    Topics visibility restrictions in topic summary page are KO

    Daniel Gallot Newbie

      We are trying to use JBossForum 1.0.1 DR on Portal 2.6.2 with AS 4.2.2.

      We want to define restricted accessibility and visibility to the forums.
      With our first tests, accessibility and visibility restrictions works fine, excepted the summary page.

      What we configured : different roles for different categories accessibility and visibility.

      <role name="Category1User" id="category1user">
       <!-- Forums Admin Tool permissions -->
      
       <!-- Message Board permissions -->
       <permission action="readCategory">
       <criteria for="readCategory://ui">param[0].title.toLowerCase().startsWith('category 1')</criteria>
       </permission>
       <permission action="readForum"/>
       <permission action="post"/>
       <permission action="managePostAttachments"/>
       <!-- permission to edit only my own posts : not given -->
       <!--permission action="editPost">
       <criteria for="editPost://ui">param[0].poster.user.userName.equals(identity.identity.userName)</criteria>
       <criteria for="editPost://action">target.post.poster.user.userName.equals(identity.identity.userName)</criteria>
       </permission-->
      
       <!-- Moderator Tool permissions -->
       </role>

      But on the summary page, a user that has only visibility on category 1 can also have visibility on posts in other categories. If he tries to view them, that does not display anything, OK. But he knows about the title of these threads (and also about the number of the thread reading the url).

      That you consider that a bug or not, for the moment, we are looking for a workaround.

      For instance, by using the existing preferences parameter "Topics limit", with the value 0, a user has no more summary page. But a registered user can modifiy it.
      So is it possible to add acl-mappings to give right or not to see and use the "Topic summary" part under the preferences ? Or even acl-mappings to give access or not to the Edit button (an anonymous user has not the Edit button) ?

      Do you see another workaround ?

      Thanks a lot for paying attention to these questions.
      Regards


        • 1. Re: Topics visibility restrictions in topic summary page are
          Ryszard Kozmik Master

          Hi

          "DanielGallot" wrote:
          That you consider that a bug or not, for the moment, we are looking for a workaround.
          Well, a bug or lack of feature, no difference, yet another issue to solve ;-).

          "DanielGallot" wrote:
          For instance, by using the existing preferences parameter "Topics limit", with the value 0, a user has no more summary page. But a registered user can modifiy it.
          So is it possible to add acl-mappings to give right or not to see and use the "Topic summary" part under the preferences ? Or even acl-mappings to give access or not to the Edit button (an anonymous user has not the Edit button) ?

          Do you see another workaround ?
          1. You can modify JSF pages flow by modifying forums-config.xml and disable user preferences screen or summary view.
          2. You can modify <c:if> tag in http://anonsvn.labs.jboss.com/labs/jbossforums/branches/forums101P26/forums/src/resources/portal-forums-war/views/index.xhtml file so that it never goes to summary page.

          But in general, I consider this approach as wrong. It looks like normal approach when using closed source software ;-). But it's open source! Instead of looking for workarounds, hacks etc. why don't you just improve summary.xhtml and ViewSummary.java to work properly? It shouldn't be hard and then you can create a patch task in JBForums' JIRA and I'll add your changes to codebase. What you and other Forums users gain:
          - no hacking
          - software improvement, the change will be in codebase so you won't need to maintain and add it when upgrading to a new version of Forums
          - no constrained features, as you will still have working summary view
          - finally the feeling that you made lives of other community users better ;-).

          Regards
          ------------------
          Ryszard Kozmik
          JBoss Forums Lead
          JBoss Labs Team