Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-17271

review plugin capabilities in terms of naming and what they control, provide guidelines for plugin writers

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • 2.0
    • Roles / Access
    • MOODLE_20_STABLE

      I think that Eloy's idea from MDL-17216 to review capability naming is excellent and right on time, hence I am creating a new tracker entry for it. I searched left and right in docs but found no mention of how to name the capabilities in plugins. I think some guidelines and rules for plugin writers should be provided. While majority of names are good or at least reasonable, there are notable exceptions, like database or glossary modules. Aside from confusing capability names, aggregation of multiple capabilities in a single entry is an issue confronted by many as evidences by forum discussions on Moodle.org.

      In terms of guidelines, IMHO, word "manage" as capability in plugins could be used only for controlling access to configuration panels (pages or tabs). Each capability should be atomic, that is deal with a single action or permission (as opposite to aggregating multiple functions, like create, edit, delete), and the name should unambiguously define what that is. Best if the name combines verb and noun, like createentries, with adjective or pronoun to clarify the scope, like editownentries, deleteanyentry. This way, capability names will largely be self-descriptive and the role system will be usable to its highest potential.

            Unassigned Unassigned
            robek Robert Brenstein
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.