]> git.mjollnir.org Git - moodle.git/commit
accesslib: get_user_by_capability() - Handle complex rolecap resolution
authormartinlanghoff <martinlanghoff>
Sun, 6 Jan 2008 23:23:24 +0000 (23:23 +0000)
committermartinlanghoff <martinlanghoff>
Sun, 6 Jan 2008 23:23:24 +0000 (23:23 +0000)
commit8b8bf40cc7b2ec3618b93ea1c5fdea9792e02c48
treee9c2a947e1534fa3c626b58aa1dc590c277fb607
parent26843e106b3d6a7a0dedb4c661cfc1ea1e008008
accesslib: get_user_by_capability() - Handle complex rolecap resolution

With this patch, get_user_by_capability() can handle the cases where
users have multiple role assignments to the same course, and PREVENTs
and PROHIBITs affect the rolecaps of this course.

Without stored procedures we cannot resolve this entirely on the
server side - so in the complex cases we do as much as we can on SQL,
and post-process the data on the PHP side, including SQL-style
pagination.

MDL-12452
lib/accesslib.php