Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-29694

Keitai Polls service returning other sites polls also when we request specific site polls

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0, 10.5, 11.0
    • Fix Version/s: 11.0
    • Component/s: Polls
    • Labels:
      None

      Description

      We are trying to get all polls of a user with in a selected site through keitai services(method name is findAllPollsForUserAndSitesAndPermission).
      When we request one site polls it's returning polls of another sites also.

      Steps to reproduce:
      1. Login as user
      2. User should have more sites(min 8) as this issue can be reproduced when user has more sites
      3. Add polls tool to each site
      4. Create at least one poll in each site
      5. Get list of polls of each site using keitai service by passing site Id
      webservice url: http://localhost:2016/direct/polls/site/siteID.json
      6. Check the poll collection information in returned json format

      Expected Result:
      Always polls of specific site should be displayed.
      Actual Result:
      You can observe that polls of a site is appearing when accessing another site's polls.

      Observation code:
      I found that this issue occurring due to code in findAllPollsForUserAndSitesAndPermission(,,-) method of PollListManagerImpl.java class
      Root cause of this issue is "for loop" condition to filter requested sites is breaking without checking all allowed sites as allowedSites list is getting modified while looping over it.

      Please validate the attached patch.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                buckett Matthew Buckett
                Reporter:
                srinivas srinivas
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration