#122 ✓resolved
Kieran P

Show Private topic titles in Related Items when user has permission

Reported by Kieran P | December 2nd, 2008 @ 10:43 AM | in 1.2

Currently, private items linked to via the Related Items interface are displayed in the topic as "No public version available" and after several items are added, it's very hard to distinguish which are which.

Change the related items interface to take into account the privacy of an item, and check whether the current user has permission to view that items private version (possibly by using the basket permissions hash from the users session).

Comments and changes to this ticket

  • Andy Robertson

    Andy Robertson December 18th, 2008 @ 03:50 PM

    We are the APN would love to see this fixed. It's one of the reasons we've not used kete as a private shared space for our managers. When they work on multiple revisions of documents marked as private and add them to a topic they can't tell which is which.

  • Walter McGinnis

    Walter McGinnis January 22nd, 2009 @ 11:22 AM

    • Milestone set to 1.2
    • State changed from “new” to “open”
    • Assigned user changed from “Kete” to “Kieran P”

    I've started work on this, mainly by adding tests (along with James) for the existing functionality.

    The trick is listing all (across baskets) related items that are private that an individual user may see. In other words each user viewing a topic with private related items should only see those items they have a right to see and thus each private view may be different per user.

    We have this same problem on "archives by type" private items counts on the site basket homepage which should show counts for all private items a user can see across baskets (the special case that is the site basket).

    Because we cache a lot of these things, this can get tricky with a standard query for private items. Thankfully we have an existing tool to return all privates items for a user, our searches know how to do the right thing. These searches will return first, a result set telling us how many records (sufficient for our site basket homepage archives by type use) and then can be asked for the results that we want (say the first 5 like on related items).

    So, for this, here's the deal:

    • exclude "no public version" items from existing queries for related items

    • add a search query to get matching private related items that is NOT cached and returns the first 5 private records below the public ones

    • we'll need to do further work to clean up where caching is done, but skip that for now

    • we'll also pull out the "create or link existing" per type links an put them in a unified area, but also skip that for now.

    Cheers, Walter

  • Kieran P

    Kieran P January 28th, 2009 @ 09:01 PM

    • State changed from “open” to “to-review”

    The work for these changes (plus refinements that followed) is now complete, along with a bunch of integration tests (which all pass). All available in enhancement_122_private_topic_titles_in_related_items. One final review, tidying up here and there, and it should be ready for master branch..

  • Walter McGinnis

    Walter McGinnis January 28th, 2009 @ 09:30 PM

    Getting there. I added a link to existing from a private topic to a
    public image and closed the pop up window. The Related Items did not
    change to reflect this, but the search did (as it should).

    Cheers, Walter

  • Walter McGinnis

    Walter McGinnis January 29th, 2009 @ 07:54 AM

    Ok. I actually repeated this with the latest commits.

    To reproduce:

    • create a private topic in a basket that has privacy controls enabled
      and is private by default
    • create a public image via "add item" (i.e. not use the Related Items
      create link) in Site
    • use Related Items link existing, choose still image, find your
      public image
    • add the relation
    • click the "close" link in the pop up window
    • detail page for the private topic refreshes, but no thumbnail or
      change in count

    Going to the public image's detail page does show the private topic as
    related though.

    That said, if I do the reverse:

    • create a public topic in Site basket
    • use the Related Items create link to create a private image in a
      private basket
    • the action completes and I'm returned to the detail page for public
      topic and image is shown correctly under "Private"
    • HOWEVER, if I click on the thumbnail and go to the image detail page
      I get "This item is not related to any Topics at this time"

    Cheers, Walter

  • Kieran P

    Kieran P January 29th, 2009 @ 09:30 AM

    I followed these steps exactly, on a fresh install and had no issues. After refresh of 'link existing' the image showed up, and on create of a private image, the topic showed up on the image page.

    This may be an issue with you Zebra setup?

  • Walter McGinnis

    Walter McGinnis January 29th, 2009 @ 10:29 AM

    I rebuilt the zebra indexes a couple times. I did it again and I get
    the same behavior for the existing items.

    Interestingly, I'm getting an error like this when loading the private

    Missing template search/_refine_by_choice.xml.erb

    Did you add and commit that template?

  • Walter McGinnis

    Walter McGinnis January 29th, 2009 @ 10:53 AM

    The Missing template error was a false alarm.

  • Walter McGinnis

    Walter McGinnis January 29th, 2009 @ 01:02 PM

    As mentioned in instant message, the issue had to basket scoping of
    search. See http://github.com/kete/kete/comm... for details.

  • Kieran P

    Kieran P January 29th, 2009 @ 02:47 PM

    • State changed from “to-review” to “resolved”

    This work has been completed and merged to master. Resolving ticket.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Kete was developed by Horowhenua Library Trust and Katipo Communications Ltd. to build a digital library of Horowhenua material.

People watching this ticket