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

Standarise mod/$modname:view capability checkings across activities

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 3.2, 4.0.5
    • General
    • None
    • MOODLE_32_STABLE, MOODLE_400_STABLE

      In MDL-49029 mod/choice:view capability was added and it required nothing else than the capability without any extra has_capability checking, as modinfo is checking mod/$modname:view capability permissions for us. This includes:

      • require_login & require_course_login with $cm
      • validate_context (external functions)
      • get_all_instances_in_course instances
      • global search

      We should be consistent across activities and perform the same kind of checkings. Right now some modules have a require_capability in mod/name/view.php some of them don't, mod/name/index.php should include a big require_capability on top of all other checkings?

      I see this mod/$modname:view capability as the whole activity is not available for users without this capability. This issue will also help us check that we are not missing any point of entry when the capability is disabled.

      Creating an issue for it as suggested by Eloy.

            Unassigned Unassigned
            dmonllao David Monllaó
            Votes:
            11 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:

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