Issue Feature Closed

#23724Optimize query to determine whether a frontend user has access to content elements or pages

Oliver Hader 10/14/10, 11:17 updated 06/15/15, 10:51

Description

The WHERE part of the query to determine whether a frontend user has access to a particular element (tt_content in this example) looks like this:

(tt_content.fe_group='' OR tt_content.fe_group IS NULL OR tt_content.fe_group='0'
OR FIND_IN_SET('0',tt_content.fe_group)
OR FIND_IN_SET('-2',tt_content.fe_group)
OR FIND_IN_SET('2',tt_content.fe_group))

It could look like the following (to simplify the OR parts for each group):

(pages.fe_group='' OR pages.fe_group IS NULL OR pages.fe_group='0'
OR pages.uid IN (SELECT uid_local FROM pages_fe_groups_rel_mm WHERE uid_foreign IN (0,-2,2)))

(issue imported from #M15985)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.