? Pending

User tests: Successful: Unsuccessful:

avatar HLeithner
HLeithner
10 Jun 2019

This PR optimizes the authorise function in the menu to not load an user object (and don't start a session if not needed) for menu items with the access level "public".

This PR in combination with PR #25152 using apcu (or any other session and cache handler except Database) and disabled session metadata brings Joomla! down to 0 database queries for cached pages.

Clearly not for all pages only for pages that doesn't require any user authentication.

Summary of Changes

Check if the menu item access level is public and return early if true.

Testing Instructions

Create menu items with different access levels.

Expected result

Nothing changes, menu is protected and visible as before.

Documentation Changes Required

No.

avatar HLeithner HLeithner - open - 10 Jun 2019
avatar HLeithner HLeithner - change - 10 Jun 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Jun 2019
Category Libraries
avatar HLeithner
HLeithner - comment - 10 Jun 2019

Side note, creating a session only if it's need can bring us down to no cookies which maybe helpful for gdpr checks.

41cf9da 10 Jun 2019 avatar HLeithner cs
avatar HLeithner HLeithner - change - 10 Jun 2019
Labels Added: ?
avatar brianteeman
brianteeman - comment - 10 Jun 2019

Guest level is also unauthenticated

avatar HLeithner
HLeithner - comment - 10 Jun 2019

You have to be logged in to have no guest level so the check needs the user object to validate if you are a guest or not.

avatar Quy Quy - change - 10 Jun 2019
Title
Improve menu item access check
[4.0] Improve menu item access check
avatar joomla-cms-bot joomla-cms-bot - edited - 10 Jun 2019
avatar wilsonge wilsonge - change - 10 Jun 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-06-10 23:03:04
Closed_By wilsonge
avatar wilsonge wilsonge - close - 10 Jun 2019
avatar wilsonge wilsonge - merge - 10 Jun 2019

Add a Comment

Login with GitHub to post a comment