1.x
2 unresolved threads
2 unresolved threads
Merge request reports
Activity
added 3 commits
added 2 commits
added 3 commits
- ui/components/ConceptProver.jsx 0 → 100644
126 try { 127 const response = await fetch('/acquia-optimize/api/settings', { 128 method: 'GET', 129 credentials: 'same-origin', 130 headers: { 131 'Accept': 'application/json', 132 } 133 }); 134 135 if (response.ok) { 136 const data = await response.json(); 137 setCanConfigure(!!data.can_configure); 138 setCanScan(!!data.can_scan); 139 140 // If user doesn't have permission to scan or configure, don't proceed further 141 if (!data.can_scan && !data.can_configure) { 56 ); 57 } 58 59 /** 60 * Gets the Acquia Optimize settings. 61 * 62 * @return \Symfony\Component\HttpFoundation\JsonResponse 63 * The JSON response containing settings. 64 */ 65 public function getSettings(): JsonResponse { 66 $config = $this->configFactory->get('acquia_optimize.settings'); 67 $hasAdminPermission = $this->currentUser()->hasPermission('administer acquia optimize'); 68 $hasScanPermission = $this->currentUser()->hasPermission('scan acquia optimize'); 69 70 $settings = [ 71 'api_key' => $config->get('api_key') ? ($hasAdminPermission ? $config->get('api_key') : '[API key set]') : '', changed this line in version 10 of the diff
added 1 commit
- 5d22915f - provide internal API endpoints for calling the external API
added 2 commits
Please register or sign in to reply