From bab432f3e10a50b409de66811049ca81bedaee16 Mon Sep 17 00:00:00 2001 From: Klaas Eikelboom Date: Mon, 4 Oct 2021 21:34:13 +0200 Subject: [PATCH] Add settings screen --- ext/authx/settings/authx.setting.php | 5 +++++ ext/authx/xml/Menu/authx.xml | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/ext/authx/settings/authx.setting.php b/ext/authx/settings/authx.setting.php index 4745d06e45..38cb08f8a3 100644 --- a/ext/authx/settings/authx.setting.php +++ b/ext/authx/settings/authx.setting.php @@ -17,6 +17,7 @@ use CRM_Authx_ExtensionUtil as E; * @copyright CiviCRM LLC https://civicrm.org/licensing */ $_authx_settings = function() { + $weight = 10; $flows = ['param', 'header', 'xheader', 'login', 'auto', 'script', 'pipe', 'legacyrest']; $basic = [ 'group_name' => 'CiviCRM Preferences', @@ -42,8 +43,10 @@ $_authx_settings = function() { 'pseudoconstant' => [ 'callback' => ['\Civi\Authx\Meta', 'getGuardTypes'], ], + 'settings_pages' => ['authx' => ['weight' => $weight]], ]; foreach ($flows as $flow) { + $weight = $weight+10; $s["authx_{$flow}_cred"] = $basic + [ 'name' => "authx_{$flow}_cred", 'type' => 'Array', @@ -59,6 +62,7 @@ $_authx_settings = function() { 'pseudoconstant' => [ 'callback' => ['\Civi\Authx\Meta', 'getCredentialTypes'], ], + 'settings_pages' => ['authx' => ['weight' => $weight]], ]; $s["authx_{$flow}_user"] = $basic + [ 'name' => "authx_{$flow}_user", @@ -74,6 +78,7 @@ $_authx_settings = function() { 'pseudoconstant' => [ 'callback' => ['\Civi\Authx\Meta', 'getUserModes'], ], + 'settings_pages' => ['authx' => ['weight' => $weight+5]], ]; } diff --git a/ext/authx/xml/Menu/authx.xml b/ext/authx/xml/Menu/authx.xml index 1f0e738339..9247d93a41 100644 --- a/ext/authx/xml/Menu/authx.xml +++ b/ext/authx/xml/Menu/authx.xml @@ -21,4 +21,12 @@ *always allow* true + + civicrm/admin/setting/authx + Authentication + CRM_Admin_Form_Generic + System Settings + Configure authentication for external systems + administer CiviCRM + -- 2.25.1