]> git.mjollnir.org Git - moodle.git/commit
accesslib: Introduce $DIRTYCONTEXTS, $USER->access[time],is_contextpath_clean()
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:10:24 +0000 (07:10 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:10:24 +0000 (07:10 +0000)
commit148eb2a7497a30b2569d02cdb9b2dbc10cea54e1
treeab3898aace503472619777c7c5690df45b0e20a6
parent0d25cd3a813765278c369f71a224888b4b82f1db
accesslib: Introduce $DIRTYCONTEXTS, $USER->access[time],is_contextpath_clean()

has_capability() now (ab)uses a new global: DIRTYCONTEXTS where we
load the contexts that have changed since since $USER->access[time]

The shallow/easy checks are done in has_capability(), deeper checks
go into the newfangled is_contextpath_clean().

The only complication now is to reload the relevant caps without losing
switches, loginas, etc...
lib/accesslib.php