When overriding eZSiteAccess you get a fatal error when you try to add/edit/see policies with limitations (particularly siteaccess limitation), the admin area exits with a Fatal error warning that a class of the kernel can't be re-declared.
The problem is that "kernel/role/edit.php" and "kernel/role/policyedit.php" use include_once("kernel/classes/ezsiteaccess.php"), and this file is also in the class autoloads array.
It isn't necessarily a bug that you can't override all kernel files, but I see it as a bug that there is nothing to stop you from overriding this file, and no warning when you do so. This should be improved, either by ensuring the override works, or by disabling it completely, or by establishing a list of files that are overrideable and show warnings/errors when other files are overridden.
Steps to reproduce:
- Copy the class eZSiteAccess (kernel/classes/ezsiteaccess.php) to the classes folder of some extension in order to implement a kernel class override.
- Activate the kernel override feature. Add or edit the conf.ini file, like so:
define( 'EZP_AUTOLOAD_ALLOW_KERNEL_OVERRIDE', true );
- Regenerate the autoloads array and the kernel override autoloads array.
- Try to see/edit/add a policy with a siteaccess limitation.