Fix debug permissions for API 4 Explorer debug
authorlarssandergreen <lars@wildsight.ca>
Mon, 3 Jul 2023 01:45:41 +0000 (19:45 -0600)
committerlarssandergreen <lars@wildsight.ca>
Mon, 3 Jul 2023 01:45:41 +0000 (19:45 -0600)
ang/api4Explorer.ang.php
ang/api4Explorer/Explorer.html
ang/api4Explorer/Explorer.js

index e539892ca593150bf133e969fd266f50c7c758d5..b7bfc25923f83ccd84b4c0f08d0e5d087d2d34af 100644 (file)
@@ -14,6 +14,6 @@ return [
   ],
   'basePages' => [],
   'bundles' => ['bootstrap3'],
-  'permissions' => ['access debug output', 'edit groups', 'administer reserved groups'],
+  'permissions' => ['view debug output', 'edit groups', 'administer reserved groups'],
   'requires' => ['crmUi', 'crmUtil', 'ngRoute', 'crmRouteBinder', 'ui.sortable', 'api4', 'ngSanitize'],
 ];
index 454d71a26d71a03d355f7432a41a99c7c7a83165..db7057d3bbd0b6631c969596cd035c72c654615e 100644 (file)
               <span>{{:: ts('Result') }}</span>
             </a>
           </li>
-          <li role="presentation" ng-if="::perm.accessDebugOutput" ng-class="{active: selectedTab.result === 'debug'}">
+          <li role="presentation" ng-if="::perm.viewDebugOutput" ng-class="{active: selectedTab.result === 'debug'}">
             <a href ng-click="selectedTab.result = 'debug'">
               <i class="fa fa-fw fa-{{ debug ? (status === 'warning' || status === 'danger' ? 'warning' : 'bug') : 'circle-o' }}"></i>
               <span>{{:: ts('Debug') }}</span>
             <pre class="prettyprint" id="api4-result-{{ $index }}" ng-bind-html="code"></pre>
           </div>
         </div>
-        <div ng-if="::perm.accessDebugOutput" ng-show="selectedTab.result === 'debug'">
+        <div ng-if="::perm.viewDebugOutput" ng-show="selectedTab.result === 'debug'">
           <pre ng-if="debug" class="prettyprint" ng-bind-html="debug"></pre>
           <div ng-if="!debug">
             <p>
index da56492df824d4225bd8d726881dd6ac1c2d39cd..5e13dcb62691ddfc0e87a408b0b91b01097403ac 100644 (file)
@@ -36,7 +36,7 @@
     $scope.selectedTab = {result: 'result'};
     $scope.crmUrl = CRM.url;
     $scope.perm = {
-      accessDebugOutput: CRM.checkPerm('access debug output'),
+      viewDebugOutput: CRM.checkPerm('view debug output'),
     };
     marked.setOptions({highlight: prettyPrintOne});
     var getMetaParams = {},