Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19207

checkTriggerViewPermission succeeds despite lacking CREATE VIEW permission

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Critical
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.10
    • Fix Version/s: 4.7.11
    • Component/s: None
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      Steps to reproduce:
      1. Alter a civicrm user without MySQL CREATE VIEW permission
      2. Go to admin/setting/localization
      3. Checkbox to enable mulitlingual support is available
      4. Proceeding to enable multilingual support yields in corrupted database upon trying to create a view

      Behaviour may need to be checked for all occurences:
      ./CRM/Upgrade/Incremental/php/FourOne.php:47: if (!CRM_Core_DAO::checkTriggerViewPermission(TRUE, FALSE))
      ./CRM/Upgrade/Form.php:494: if (!CRM_Core_DAO::checkTriggerViewPermission(FALSE, TRUE))
      ./CRM/Core/DAO.php:1881: public static function checkTriggerViewPermission($view = TRUE, $trigger = TRUE)
      ./CRM/Admin/Form/Setting/Localization.php:88: $validTriggerPermission = CRM_Core_DAO::checkTriggerViewPermission(TRUE);
      ./CRM/Admin/Form/Setting/Miscellaneous.php:86: $this->assign('validTriggerPermission', CRM_Core_DAO::checkTriggerViewPermission(FALSE));
      ./CRM/Admin/Form/Setting/Component.php:86: !CRM_Core_DAO::checkTriggerViewPermission(TRUE, FALSE)
      ./CRM/Logging/Schema.php:85: if (!(CRM_Core_DAO::checkTriggerViewPermission(FALSE)) && $value)

        Attachments

        1. No_CV_Permission.png
          22 kB
          Thomas Schüttler
        2. No_CV_PermissionAfterApplying.png
          213 kB
          Thomas Schüttler
        3. Screen Shot 2016-08-11 at 4.07.47 PM.png
          301 kB
          Monish Deb
        4. Screen Shot 2016-08-11 at 4.13.27 PM.png
          217 kB
          Monish Deb

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              tschuettler Thomas Schüttler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: