Loading...
 
Skip to main content

Trackerfield ItemLink - Unified search permission issue

Status
Closed
Subject
Trackerfield ItemLink - Unified search permission issue
Version
14.x Regression
Category
  • Release Blocker
Feature
Trackers
Resolution status
Please retest
Submitted by
WolfgangA
Volunteered to solve
Nelson Ko
Lastmod by
WolfgangA
Rating
(0)
Description

When using the trackerfield ItemLink, the select box stays empty when logging in as a user and category fields are used to set permissions.

The problem is that the xhr call to populate the select box of ItemLink contains an empty response and gets not populated.

Copy to clipboard
tiki-ajax_services.php?maxRecords=250&format=&filter[type]=trackeritem&filter[tracker_id]=6&filter[tracker_status]=o%20OR%20p%20OR%20c&controller=search&action=lookup {"title":"Lookup Result","resultset":{"count":0,"offset":0,"maxRecords":250,"result":[]}}


As admin, the responce contains the correct data.

Initially, i thought that was a permisson setup issue. But the trackeritem view shows the correct entries.

Steps to reproduce:

- 2 users, 2 groups, 2 categories, User A and B, Group A and B, and Category A and B
- have 2 trackers, one link to the other via item link
- create 2 items Item A and Item B in 1st tracker
- set the category perms such that tiki_p_view_tracker can be done by Group A on Category A, and Group B on Category B
- categorize the Item A and Item B (which is in the first tracker ) into category A and B

To be more concret:
Tracker1 = "Companies", Fields: "CompanyName":textfield, "Cat":category
Tracker2 = "Contacts", Fields "ContactName":textfield, "CompanyName":ItemLink to Tracker1 "CompanyName"

Groups: Categories: "Companies", "CompanyA", "CompanyB".
"CompanyA", "CompanyB" inherit from "Companies".

Categories: "Companies", "CompanyA", "CompanyB"
Permissions category "Companies": tiki_p_view_tracker on group, tiki_p_create_tracker_items on group "Companies"
Permissions category "CompanyA": tiki_p_view_tracker,tiki_p_view_tracker_pending, tiki_p_view_tracker_closed, tiki_p_create_tracker_items etc. on group "CompanyA"
Permissions category "Companyb": tiki_p_view_tracker,tiki_p_view_tracker_pending, tiki_p_view_tracker_closed, tiki_p_create_tracker_items etc. on group "CompanyB"

Users:
"UserA", Def.Group = "CompanyA"
"UserB", Def.Group = "CompanyB"

Entries Tracker "Companies":
CompanyName = "CompanyA", Cat="CompanyA"
CompanyName = "CompanyB", Cat="CompanyB"

If you now login as UserA the itemlist of Tracker1 = "Companies" shows one entry: "CompanyA" which is correct.
If you login as admin, you will see two entries "CompanyA" and "CompanyB" which is correct.

If you login as UserA and try to create a new item in tracker2 = "Contacts" the ItemLink field does not show anything. This is wong. Expected to see the same items as in tracker item list.
If you login as admin and try to create a new item in tracker2 = "Contacts" the ItemLink field shows all entries. This is ok.

admin / 12345
usera / 12345
userb / 12345

Showinstance works so far - need to check local install again.

Solution

Fixed in r54196 (r54204 in 14.x branch).

This had nothing to do with item link field per se.

Basically, when username has a blank in it, and when MySQL engine is used, no results are returned. Sorry for sloppy code in r52294 that caused this. The reason why the show instance works is because the usernames don't have spaces in them.

It affects all unified search queries, and it just happened that wolfgang (Walter) discovered it while using the Item Link field. Thanks to him for all his testing.

I tracked it down after trying queries such as tiki-searchindex.php?filter~type=trackeritem&filter~tracker_id=6 and tiki-searchindex.php?filter~type=wiki+page, which then I realized this is a search permission issue and not a item Link issue per se.

Appendix: Yes the root cause was an exception in the unifiedsearch. Fixed in 54212 14.x / r54213 trunk.
Thank you Nelson.

Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
5572
Created
Monday 02 March, 2015 23:02:09 UTC
by WolfgangA
LastModif
Tuesday 03 March, 2015 18:53:19 UTC


Show PHP error messages