mdjnelson / moodle-mod_customcert

Enables the creation of dynamically generated certificates with complete customisation via the web browser.
https://moodle.org/plugins/mod_customcert
GNU General Public License v3.0
90 stars 158 forks source link

Non-editing teacher has mod/customcert:manage #515

Closed leonstr closed 7 months ago

leonstr commented 1 year ago

db/access.php has:

    'mod/customcert:manage' => array(

        'captype' => 'write',
        'contextlevel' => CONTEXT_MODULE,
        'archetypes' => array(
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'manager' => CAP_ALLOW
        )
    ),

This grants non-editing teachers access to the Edit Certificate page.

I don't think non-editing teachers should have this capability.

mdjnelson commented 7 months ago

Yep, I agree. I will just change it in db/access.php so I don't break any existing sites relying on this. Also, wow, a teacher role is a non-editing teacher? Why isn't that explicitly declared in the name of the role?