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
- 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 clipboardtiki-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 BTo 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 / 12345Showinstance 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+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 5572
- Created
- Monday 02 March, 2015 23:02:09 UTC
by WolfgangA - LastModif
- Tuesday 03 March, 2015 18:53:19 UTC