Moodle

Capabilities for the database module are not atomic and ambigous, blocking designing desired module instances

Details

  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

mod/data:writeentries capability

It seems that this permission controls only creation (writing new records), although the name could imply also editing (writing to existing records).

mod/data:manageentries capability

It is not clear what actual capabilites are included here. I am guessing Edit and Delete. Manage is vague as a word, and the docs say nothing more concrete. There is a whole range of "manage" permissions.

For example, with those capabilities, it is not possible to produce a database where records may be added and deleted only by teachers or administrators but can be edited by all students since manageentries is a combination of permissions.

It be useful to rename the ambigous permissions and have more atomic capabilities. For example, instead of writeentries and manageentries:

mod/data:createentries
mod/data:editownentries
mod/data:editanyentry
mod/data:deleteownentries
mod/data:deleteanyentry

Issue Links

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

I think we should be more or less consistent across those type of permissions, not only in database module but in cousins like forum, glossary... Perhaps this could be a good moment for a review.

Assigning to Martin Dougiamas for his consideration and addressing this initially for 2.0 (I think we cannot change this in stable releases).

Ciao

Show
Eloy Lafuente (stronk7) added a comment - I think we should be more or less consistent across those type of permissions, not only in database module but in cousins like forum, glossary... Perhaps this could be a good moment for a review. Assigning to Martin Dougiamas for his consideration and addressing this initially for 2.0 (I think we cannot change this in stable releases). Ciao
Hide
Robert Brenstein added a comment -

While looking for guidelines in naming the capabilities, I found that page http://docs.moodle.org/en/Development:Roles#Capabilities gives more details about the database capabilities than database module documentation. That is sad. Unfortunately, that page confirms my observations. Worse, i found that writeentries also includes deleting, so it is a trio of atomic capabilities in one. Not good.

I really like Eloy's idea of review, so I created a separate tracker entry for it – MDL-17271

Show
Robert Brenstein added a comment - While looking for guidelines in naming the capabilities, I found that page http://docs.moodle.org/en/Development:Roles#Capabilities gives more details about the database capabilities than database module documentation. That is sad. Unfortunately, that page confirms my observations. Worse, i found that writeentries also includes deleting, so it is a trio of atomic capabilities in one. Not good. I really like Eloy's idea of review, so I created a separate tracker entry for it – MDL-17271
Hide
Eloy Lafuente (stronk7) added a comment -

NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.

Show
Eloy Lafuente (stronk7) added a comment - NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated: