mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
accesslib: has_capability_in_accessdata() respects rdef locality a bi…
…t more With this patch, we respect rdef locality when two roles assignments in the same context have conflicting rdefs. In that case, the most local rdef wins. So RA locality still matters most. If you are a teacher sitewide and a student in course X, student role trumps teacher. For a use case, see the discussion here http://moodle.org/mod/forum/discuss.php?d=84472 Notes: - If we wanted to have locality of RDEF trump everything we can. A comment in this patch shows how. - I don't know how to reproduce this in pure SQL. And Also: This patch also fixes a bug where if CAP_PROHIBIT was set _and_ another role added to it in the same context, we would add or substract 1 to CAP_PROHIBIT, and it would lose its magic. And while at it, tighten the code to avoid casts. All the ints are unambiguously ints.
- Loading branch information
martinlanghoff
committed
Nov 20, 2007
1 parent
d77bd5e
commit 27bb711
Showing
1 changed file
with
42 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters