Issue Details (XML | Word | Printable)

Key: MDL-8521
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Petr Skoda
Reporter: Petr Skoda
Votes: 0
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

New capability for "safe" overriding

Created: 15/Feb/07 06:28 AM   Updated: 29/Jul/08 05:58 PM
Return to search
Component/s: Roles
Affects Version/s: 1.7
Fix Version/s: 1.9.3

File Attachments: 1. Text File safeoverrides16.patch (25 kB)

Issue Links:
Relates

Participants: Eloy Lafuente (stronk7), Helen Foster, Martin Dougiamas and Petr Skoda
Security Level: None
QA Assignee: Helen Foster
Resolved date: 24/Jul/08
Affected Branches: MOODLE_17_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
At present only admins can use moodle/role:override by default - the reason is security.

We could create a new capability moodle/role:safeoverride - and enable it for normal teachers, it would allow them to override only those capabilities without RISK_PERSONAL | RISK_XSS | RISK_CONFIG in roles they can assign

we could then move some more module and course settings into roles.

time needed for implementation and testing: cca 1 day

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Martin Dougiamas added a comment - 05/Mar/07 04:16 PM
Can you hold off on this for a while ... I'm a little concerned about the added complexity for GUI and code and documentation and training ...

Petr Skoda added a comment - 05/Mar/07 08:12 PM
As you wish
  • code - new much shorter patch attached, only minimal relevant changes in code; code is fully tested and working fine for me
  • gui is the same
  • documentation & training- now disabled by default in patch; would be much easier if we fix MDL-7859

Eloy Lafuente (stronk7) added a comment - 11/Mar/07 08:20 PM
Sounds interesting (+1) , although I've some "use-related" things to do.

If I would be a "normal" Moodle user, I Think I'll found quite frustrating to go to the module->update page to configure somethings about the module and then, go to the roles/caps page of the module to adjust others.

So I would propose to have ALL the settings in the module page, no matter if they are going to be module settings or capability settings.

Then, both add and update will perform the required tasks, either in the module or in capabilities. I really think we should follow this behaviour. It will allow teachers to ignore all the underlying structure and will make things consistent, instead of having to know WHERE is every setting and what it means.

Ciao


Petr Skoda added a comment - 21/Jul/08 08:52 PM
sending latest patch, should be production quality:

1/ the safe overrides now share the same configuration matrix with normal overrides + improved description text above
2/ added safe override notice explaining the locked caps - bellow the capabilities table
3/ improved performance for both assignable and overridable roles


Martin Dougiamas added a comment - 22/Jul/08 12:04 AM - edited
I tried the patch and it is really nice to use from the overrides screen. I think it's a great addition. +1 for 1.9.3

Two questions about the admin setup side of it though:

1) Query: If you have override and safeoverride is it exactly the same as having override alone? I assume so.

2) Minor Gui thing: The override and safeoverride are not next to each in the list (sort order?)

3) Major GUI thing: The mix of the matrix and the two override caps is a bit confusing ... since the matrix is there as protection can we not just make at least safeoverride as ALLOW by default for all roles? Then we can be more explicit on the matrix screen about what to do if you want to allow people to override unsafe things. Or perhaps better, can we allow setting of the override/safeoverride cap from the matrix screen (checkboxes under role name on left)?


Petr Skoda added a comment - 22/Jul/08 12:23 AM
1/ yes - normal override has higher priority - you need to prohibit both if you want to prevent access completely
2/ going to work on that list ordering too in separate issue

Petr Skoda added a comment - 22/Jul/08 07:28 PM - edited
1/ fixed risk definitions in access.php's
2/ added allow override editingteacher -> student, guest and non-editing teacher (new install and 1.6 upgrade)
3/ enabled safeoverride by default for editing teachers
4/ hardcoded exception for course and category delete and reset - these do not have risks, but are not "safe"

Expected commit day is Wednesday


Petr Skoda added a comment - 22/Jul/08 09:41 PM
added new risk RISK_UNSAFEOVERRIDE instead of the hardcoded list

Petr Skoda added a comment - 23/Jul/08 04:09 PM
sending latest patch, the safeoverrides cap is not enable by default for any role, I am bit afraid because in might have some unexpected results on existing sites.

Petr Skoda added a comment - 23/Jul/08 04:17 PM
RISK_DATALOSS is a better name, thanks Martin!

Petr Skoda added a comment - 24/Jul/08 12:11 AM
code in cvs, assigning to Helen, please update docs

Petr Skoda added a comment - 24/Jul/08 02:06 PM
I have file a separate issue for docs, closing now
thanks!

Martin Dougiamas added a comment - 28/Jul/08 11:24 AM
I took the defaults out of 1.9 again : MDL-15841

Helen Foster added a comment - 29/Jul/08 05:58 PM
Petr, thanks a lot for creating the safe overrides capability