[TYPO3-Solr] Access restriction issues

Ingo Renner ingo at typo3.org
Thu Nov 15 11:41:14 CET 2012


Am 09.11.12 08:22, schrieb Dmitry Dulepov:

Hi Dmitry,

> We index irfaq entries normally (using TS setup). However the result we
> get is strange:
> - the irfaq item has "r:1" as "access" field [?]

r = record (handled differently than c = content)
1 is the ID of the fe group you need to be a member of to access this 
record.

> - non-logged in users cannot find the FAQ item [ok]
> - any logged in user can see the FAQ item with summary in search
> results, even if he is not in the user group of the FAQ page [wrong]

In this case, not the displaying page's access restrictions are 
relevant, but the record's.

> - URL of the item is always empty (also in the Solr admin interface)
> [wrong]

usually (as you mentioned) happens when typolink can't create an URL for 
the page definied in typolink.parameter.

> I can understand why the URL is empty: Solr ext uses typolink to build
> the URL and TYPO3 will not produce any because no appropriate user is
> logged in. Should there be a hook to allow link generation without
> access restrictions? I think the URL should be always there but results
> should be filtered according to current user's group list.

Right, there should always be a URL. I think 
typolink.linkAccessRestrictedPages = 1 should help here, did you try that?

> It is unclear why *any* logged in user can see the result, even if he
> has no corresponding page permissions. Probably it should be handled in
> some way. Or may be I do not know how to configure it properly :(

If it is of any help, you can set the access field your self. The field 
is filled when creating the base document in tx_solr_indexqueue_Indexer. 
You can the overwrite it using the TypoScript mapping. To understand ho 
the access field works, please read the class comment in 
tx_solr_access_Rootline

Let me know if that helps and if we can improve something in the extension.


Best,
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2, Admin Google Summer of Code

TYPO3 - Open Source Enterprise Content Management System
http://typo3.org

Apache Solr for TYPO3 -
Open Source Enterprise Search meets Open Source Enterprise CMS
http://www.typo3-solr.com


More information about the TYPO3-project-solr mailing list