From 9bffb8daaf2fd53bb912fb0e09a2e0eee8c11896 Mon Sep 17 00:00:00 2001 From: gregcorbett Date: Thu, 20 Apr 2023 09:38:32 +0100 Subject: [PATCH 1/7] Add flag images for NGI_LT --- htdocs/web_portal/img/ngi/NGI_LT.jpg | Bin 0 -> 1005 bytes htdocs/web_portal/img/ngi/fullSize/NGI_LT.jpg | Bin 0 -> 1611 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 htdocs/web_portal/img/ngi/NGI_LT.jpg create mode 100644 htdocs/web_portal/img/ngi/fullSize/NGI_LT.jpg diff --git a/htdocs/web_portal/img/ngi/NGI_LT.jpg b/htdocs/web_portal/img/ngi/NGI_LT.jpg new file mode 100644 index 0000000000000000000000000000000000000000..05052ed7820f871a2cfcb89a2bcf8227dd96d8d7 GIT binary patch literal 1005 zcmbV~Sxgf_7{|Zaqq{8yx}0iMgmOuIDCLsINB}`0A*Oiy!l5EyOa$dLSV08z#o&pW zh=_{#Vk&~i6Ga5{h2X{YfS>~6OMwc7)Q+<)0p&^kcE0@ov-{1L`OPfu!=FHr7@rUi z2q8!%58z?wh%3y>07y!LAOPTjLu#Oib0e9KHUmpkoadt`o0kw@K_i<-#J6Y_AS!7I zpcQ}-JxS2IEO~LRR;fcYDz!!(zAiXYqY5XUye;+zRB;>Nbh%yU$!gnt+^%^lyH2Fq zRa0YE&to>V)#@+cL5KwkA#p4O&C+5>7=~s!3CD@aOC6*V-!SQqc$Xo;&fjq}NIQTG5gE0(4SFIjHqcvjI@N)`-(iE_~RVIeYW=jBuTccrO4&MO!hnHJu~g}n8sq+7Jm*P_ literal 0 HcmV?d00001 diff --git a/htdocs/web_portal/img/ngi/fullSize/NGI_LT.jpg b/htdocs/web_portal/img/ngi/fullSize/NGI_LT.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1c6a94ed1063546875c9f1753bf1bbebc9745631 GIT binary patch literal 1611 zcmeAS@N?(olHy`uVBq!ia0y~yU~gbxU}<1t28txB>^K3WSkfJR9T^xl_H+M9WCijS zl0AZa85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#NP=Y7GC&cydPGN>D zmxJoM|NsBz^-#zGiZdp8ySp$8^7woLa@b2eeO=j~Gf4@vF{vEg*TlfUYUAnR7*cWT z?L|XI1_qA920lqbQ}_fHAy7F&Es`jkcLLl9WMQ~n$yh}ZcJ+|uE^=Kft7)Q+p~QWP&DM`r(~v8;?`ikn@tB)5PQ1%xvX Date: Wed, 28 Jun 2023 14:00:22 +0000 Subject: [PATCH 2/7] [GT-180] Add API credentials support to search --- htdocs/web_portal/controllers/search.php | 7 ++- htdocs/web_portal/views/search_results.php | 56 +++++++++++++++++++++- lib/Gocdb_Services/Search.php | 19 +++++++- 3 files changed, 79 insertions(+), 3 deletions(-) diff --git a/htdocs/web_portal/controllers/search.php b/htdocs/web_portal/controllers/search.php index 95ad0e18a..d057ae830 100644 --- a/htdocs/web_portal/controllers/search.php +++ b/htdocs/web_portal/controllers/search.php @@ -23,7 +23,7 @@ function search() { require_once __DIR__.'/../../../lib/Gocdb_Services/Factory.php'; - + $params = []; $dn = Get_User_Principle(); $user = \Factory::getUserService()->getUserByPrinciple($dn); @@ -58,11 +58,16 @@ function search() { $serviceResults = $searchServ->getServices($params['searchTerm']); $userResults = $searchServ->getUsers($params['searchTerm']); $ngiResults = $searchServ->getNgis($params['searchTerm']); + $siteIdentifiers = $searchServ->getSiteIdentifiers( + $user, + $params['searchTerm'] + ); $params['siteResults'] = $siteResults; $params['serviceResults'] = $serviceResults; $params['userResults'] = $userResults; $params['ngiResults'] = $ngiResults; + $params['siteIdentifiers'] = $siteIdentifiers; show_view('search_results.php', $params, "Searching for \"{$params['searchTerm']}\""); } diff --git a/htdocs/web_portal/views/search_results.php b/htdocs/web_portal/views/search_results.php index 61911669c..f67456515 100644 --- a/htdocs/web_portal/views/search_results.php +++ b/htdocs/web_portal/views/search_results.php @@ -181,7 +181,61 @@ 0"?> - + + 0) { ?> +
+
+ +

+ API credentials +

+
+ + + + + + + + + + + + + + + + + + +
Site NameIdentifier
+ + getParentSite()->getShortName()) ?> + + + getIdentifier()); ?> +
+ +
+ 0"?> + +
No results found
diff --git a/lib/Gocdb_Services/Search.php b/lib/Gocdb_Services/Search.php index 5103a99b3..6b5b42106 100644 --- a/lib/Gocdb_Services/Search.php +++ b/lib/Gocdb_Services/Search.php @@ -101,4 +101,21 @@ public function getNgis($searchTerm) { return $ngis; } -} \ No newline at end of file + /** + * When the user is admin, it retrieves the matching identifiers. + */ + public function getSiteIdentifiers($user, $searchTerm) + { + if ($user->isAdmin()) { + $dql = "SELECT ui FROM APIAuthentication ui " + . " WHERE UPPER(ui.identifier) " + . " LIKE UPPER(concat(concat('%', :searchTerm), '%'))"; + $siteIdentifiers = $this->em + ->createQuery($dql) + ->setParameter(":searchTerm", $searchTerm) + ->getResult(); + + return $siteIdentifiers; + } + } +} From b58bb371bc585ffe5b86761b43e8def07d1e680e Mon Sep 17 00:00:00 2001 From: Adrian Coveney Date: Mon, 14 Aug 2023 10:28:36 +0000 Subject: [PATCH 3/7] Improve clarity of text and layout - Slim down identifier linking/recovery page to focus on important content. - Reword some sections to hopefully be more clear. - Add newline at end of file. --- .../web_portal/views/user/link_identity.php | 61 ++++--------------- 1 file changed, 11 insertions(+), 50 deletions(-) diff --git a/htdocs/web_portal/views/user/link_identity.php b/htdocs/web_portal/views/user/link_identity.php index 1ffb3c5e8..0f922593c 100644 --- a/htdocs/web_portal/views/user/link_identity.php +++ b/htdocs/web_portal/views/user/link_identity.php @@ -1,59 +1,21 @@
-

Link Identity or Recover an Account

- -
- +

Link Identifier or Recover an Account

-

What is identity linking?

-
    -
  • - You can use this process to add your current authentication method as a way to log in to an existing account. -
  • -
  • - This allows access to a single account through two or more identifiers. -
  • -
  • - You must have access to the email address associated with the account being linked. -
  • -
  • - Your current authentication type must be different to any authentication types already associated - with the account being linked. -
  • -
- -

What is account recovery?

-
    -
  • - If your identifier has changed, you can use this process to update it and regain control of your old account. -
  • -
  • - You must have access to the email address associated with your old account. -
  • -
  • - Your current authentication type must be the same as the authentication type you enter for your old account. -
  • + This page allows you to either add a new identifier to an exisitng GOCDB account, or recover a GOCDB account if your identifier has changed. You must have access to the email address associated with that GOCDB account. You must be logged in with the new identifier.
-
-
- +
Your current ID string (e.g. certificate DN) is: - -
- +
+
Your current authentication type is: - - -
-
+
-

Details of account to be linked or recovered

- -
+

Details of account to be linked to or recovered

@@ -104,8 +66,6 @@ class="form-control"
-
-