[Vtigercrm-developers] caching user privileges

Adam Heinz amh at metricwise.net
Tue Mar 20 13:00:06 PDT 2012


Third patch uploaded. I had a bit of a windfall and was able to make
good use of some 5.1.1 refactoring by Asha that essentially created a
materialized view in vtiger_tmp_*_sharing_per tables. My development
sandbox is now running without any user/sharing_privilege files! Look
ma, no hands! At this point, I've done enough to alleviate the
problem, so now I just need to put a bow on things. Remaining tasks:

1. I didn't quite understand the groupid vs userid SQL in the sharing
rules and I'm certain that I've gotten some of the SQL wrong. I'm
going to sync back to immediately after ticket 7342, write some
phpunit tests to fix the behavior in place, then sync forward and
repair the logic.
2. I ended up with a recursive dependency between retrieve_user_info
and getUserInfo(), which I have temporarily worked around by not
having any caching for a couple queries that are guaranteed to load on
every page.
3. I currently rely on the default values for $ADODB_CACHE_DIR and
ADOConnection->cacheSecs. I have no plans to create admin gui for
these settings; they will probably get jammed in config.*.php files.
4. We already have code in place to support sharing delete privileges,
some of which is evident in the latest patch. I can either cut this
stuff out of the patch, or plan to create additional patches against a
new ticket in the future.
5. Load testing, profiling, etcetera.



More information about the vtigercrm-developers mailing list