Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-200

Fatal error, when trying to get event section (for permission checking) in SetCustomQuery method

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.0.2
    • Component/s: Permissions
    • Labels:
      None
    • Additional information:
      Hide

      This all happens, because "top_prefix" event parameter is not set for item/list build events. In normal cases it is only set for main event (which name is given in user's request).

      You always can hardcode section name and not to get it from event, but in case if typing error occurs, then such case will be hard to track, because no visual errors occur.

      Show
      This all happens, because "top_prefix" event parameter is not set for item/list build events. In normal cases it is only set for main event (which name is given in user's request). You always can hardcode section name and not to get it from event, but in case if typing error occurs, then such case will be hard to track, because no visual errors occur.
    • External issue ID:
      241
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      When you try to call given code inside "kDBEventHandler::SetCustomQuery" method, then you get fatal error about unknown prefix.

      $perm_section = $event->getSection();
      $allowed = $this->Application->CheckPermission($perm_section . '.advanced:permission_name');


      There are no places in default installation when such error happens, only in customizations.

        Attachments

          Activity

            People

            • Assignee:
              alex Alex
              Reporter:
              alex Alex
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: