|
[
Permalink
| « Hide
]
Petr Skoda added a comment - 05/Mar/07 08:36 AM
CONTEXT_ANYWHERE could have value 0
I wouldn't add more false" contexts at all.
Pasted from chat with Petr... 1) Define applicable contexts (by LISTING them) for both roles and capabilities (some tricks like empty = ALL... and, perhaps other posibilities like, "recursively down" and "recursively up" to save long definitions could be used). 2cents (one from me and another from Petr) :-D List of capabilities that should be fixed:
changed context: moodle/site:approvecourse - CONTEXT_COURSECAT moodle/role:switchroles - CONTEXT_COURSE no context == everywhere Remove - replaced by overides in frontpage course and normal backup/restore roles: Capability upgrade code finished and tested - see Instead of crating new context for everywhere we could just skip the definition in access.php
We could implement this as bitmask while keeping backwards compatibility in definition. Each bit would specify context where capability is usable.
This would also require to add hooks for modules and blocks to specify which core caps they use. Benefits would be:
Expected time needed for implementation: 1 week David - What is it that you envision Laia being able to do with this issue? I believe that some work was done to improve the UI for working with roles although I do not recall who had worked on that, what the status of that work was, and whether it has been incorporated into 1.9 or HEAD. I think it would be good if we could help focus Laia's work and wonder if this might not be outside the scope of that unless there were something particular you had in mind for her to do with this. Peace - Anthony
this should be mostly solved, context levels should be mostly fixed now and there is an option to specify extra caps for blocks and modules, the user context hacks are hardcoded for now, we might improve the user context in 2.0 by adding default overrides (not sure is it is a good idea though because it might have major perf problems)
toto: document in coding guide somewhere
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||