]> git.mjollnir.org Git - moodle.git/commit
accesslib: Introduce (and use) reload_all_capabilities()
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:11:18 +0000 (07:11 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:11:18 +0000 (07:11 +0000)
commitef989bd95e503a445b49f58b89662b6f70b50e19
treecda433e789f4090cb2f3cd99d6b2d2f7aa189fc6
parent2123166d62d2cc9e85c316d3cd804a79a55758c1
accesslib: Introduce (and use) reload_all_capabilities()

If accessinfo is stale, we need to reload it without losing
out "interesting" state -- transparently for the end user.

That means preserving active role switches, loginas (site and course
level), etc. The logic for that is encapsulated in
reload_all_capabilities().

Also affected:
 - has_capability() which now calls reload_all_capabilities()
 - role_switch() - minor tidyup
lib/accesslib.php