Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Finish DBAL migration (CO-2235), rename TierApiController to TapApiCo…
…ntroller (CO-2470)
Benn Oshrin committed Nov 27, 2022
1 parent b5c9bab commit d1cf34d
Showing 456 changed files with 8,659 additions and 66,459 deletions.
1 change: 0 additions & 1 deletion app/composer.json
@@ -6,7 +6,6 @@
"license": "MIT",
"require": {
"php": ">=7.3",
"adodb/adodb-php": "^5.21",
"cakephp/cakephp": "^4.3",
"cakephp/migrations": "^3.2",
"cakephp/plugin-installer": "^1.3",
145 changes: 54 additions & 91 deletions app/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions app/config/routes.php
@@ -58,21 +58,21 @@
$builder->connect('/pages/*', 'Pages::display');

/**
* TIER ID Match API Routes
* TAP ID Match API Routes
*/

// Match Request
$builder->get('/api/{matchgrid_id}/v1/matchRequests/{id}', ['controller' => 'TierApi', 'action' => 'viewMatchRequest']);
$builder->get('/api/{matchgrid_id}/v1/matchRequests', ['controller' => 'TierApi', 'action' => 'viewMatchRequests']);
$builder->put('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TierApi', 'action' => 'match']);
$builder->post('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TierApi', 'action' => 'search']);
$builder->get('/api/{matchgrid_id}/v1/matchRequests/{id}', ['controller' => 'TapApi', 'action' => 'viewMatchRequest']);
$builder->get('/api/{matchgrid_id}/v1/matchRequests', ['controller' => 'TapApi', 'action' => 'viewMatchRequests']);
$builder->put('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TapApi', 'action' => 'match']);
$builder->post('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TapApi', 'action' => 'search']);
// This doesn't match and we end up in current(), so we just check there
// Also, as of API v1.0.0, search over GET has been removed
// $builder->get('/api/{matchgrid_id}/v1/people/{sor}/{sorid}?*', ['controller' => 'TierApi', 'action' => 'search']);
$builder->delete('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TierApi', 'action' => 'remove']);
$builder->get('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TierApi', 'action' => 'current']);
$builder->get('/api/{matchgrid_id}/v1/people/{sor}', ['controller' => 'TierApi', 'action' => 'inventory']);
$builder->put('/api/{matchgrid_id}/v1/referenceIds/{id}', ['controller' => 'TierApi', 'action' => 'merge']);
// $builder->get('/api/{matchgrid_id}/v1/people/{sor}/{sorid}?*', ['controller' => 'TapApi', 'action' => 'search']);
$builder->delete('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TapApi', 'action' => 'remove']);
$builder->get('/api/{matchgrid_id}/v1/people/{sor}/{sorid}', ['controller' => 'TapApi', 'action' => 'current']);
$builder->get('/api/{matchgrid_id}/v1/people/{sor}', ['controller' => 'TapApi', 'action' => 'inventory']);
$builder->put('/api/{matchgrid_id}/v1/referenceIds/{id}', ['controller' => 'TapApi', 'action' => 'merge']);

/**
* Connect catchall routes for all controllers.
6 changes: 3 additions & 3 deletions app/resources/locales/en_US/default.po
@@ -348,15 +348,15 @@ msgstr "No type defined for table {0} column {1}"
msgid "match.er.schema.parse"
msgstr "Failed to parse file {0}"

msgid "match.er.unauthorized"
msgstr "{0} does not have any valid permissions"

msgid "match.er.search_type"
msgstr "Unknown search type '{0}'"

msgid "match.er.table"
msgstr "Matchgrid table %1$s does not exist"

msgid "match.er.unauthorized"
msgstr "Unauthorized (see logs for more details)"

msgid "match.er.val.email"
msgstr "Provided value does not appear to be an email address"

2 changes: 1 addition & 1 deletion app/src/Application.php
@@ -41,7 +41,7 @@ public function middleware(\Cake\Http\MiddlewareQueue $middlewareQueue): \Cake\H
$csrf = new CsrfProtectionMiddleware(['cookieName' => 'matchCsrfToken']);
$csrf->skipCheckCallback(function (ServerRequestInterface $request) {
// skip controllers
$skipedControllers = ['TierApi']; // Controllers list
$skipedControllers = ['TapApi']; // Controllers list
if(in_array($request->getParam('controller'), $skipedControllers, true)) {
return true;
}
18 changes: 6 additions & 12 deletions app/src/Command/DatabaseCommand.php
@@ -46,6 +46,8 @@
use Doctrine\DBAL\Schema\SchemaDiff;

class DatabaseCommand extends Command {
use \App\Lib\Traits\DatabaseTrait;

/**
* Build an Option Parser.
*
@@ -108,23 +110,13 @@ public function execute(Arguments $args, ConsoleIo $io) {
throw new \RuntimeException(__($COmponent.'.er.schema.parse', [$schemaFile]));
}

// Use the ConnectionManager to get the database config to pass to adodb.
// Use the ConnectionManager to get the database config for use below
$db = ConnectionManager::get('default');

// $db is a ConnectionInterface object
$cfg = $db->config();

$config = new \Doctrine\DBAL\Configuration();

$cfargs = [
'dbname' => $cfg['database'],
'user' => $cfg['username'],
'password' => $cfg['password'],
'host' => $cfg['host'],
'driver' => ($cfg['driver'] == 'Cake\Database\Driver\Postgres' ? "pdo_pgsql" : "pdo_mysql")
];

$conn = DriverManager::getConnection($cfargs, $config);
$conn = $this->connectDatabase();

$schema = new Schema();

@@ -277,5 +269,7 @@ public function execute(Arguments $args, ConsoleIo $io) {
// We might run bin/cake schema_cache clear or
// bin/cake schema_cache build --connection default
// but so far we don't have an example indicating it's needed.

$this->disconnectDatabase();
}
}
@@ -1,6 +1,6 @@
<?php
/**
* COmanage Match TIER API Controller
* COmanage Match TAP API Controller
*
* Portions licensed to the University Corporation for Advanced Internet
* Development, Inc. ("UCAID") under one or more contributor license agreements.
@@ -19,7 +19,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @link http://www.internet2.edu/comanage COmanage Project
* @link https://www.internet2.edu/comanage COmanage Project
* @package match
* @since COmanage Match v1.0.0
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
@@ -38,7 +38,7 @@
use \App\Lib\Enum\ResolutionModeEnum;
use \App\Lib\Enum\StatusEnum;

class TierApiController extends AppController {
class TapApiController extends AppController {
// Set by dispatched functions to control results
protected $statusCode = 500;
protected $result = [];
@@ -106,12 +106,12 @@ protected function dispatch(string $func) {
try {
$MatchService = new \App\Lib\Match\MatchService();

$MatchService->connect();
$MatchService->connectDatabase();
$MatchService->setConfig($matchgridId);

$this->$func($MatchService);

$MatchService->disconnect();
$MatchService->disconnectDatabase();
}
catch(\Exception $e) {
$statusCode = 500;
@@ -199,7 +199,7 @@ protected function doMatchRequest(bool $searchOnly=false) {
$MatchService = new \App\Lib\Match\MatchService();
$MatchgridHistory = $this->getTableLocator()->get('MatchgridHistoryRecords');

$MatchService->connect();
$MatchService->connectDatabase();

$AttributeManager->parseFromJSON($json);

@@ -224,10 +224,10 @@ protected function doMatchRequest(bool $searchOnly=false) {

// The current row ID for this $sor + $sorid, if any
$curid = $MatchService->getRequestIdForSorId($sor, $sorid);

// The current Reference ID for the current row ID, if any
$currentReferenceId = ($curid ? $MatchService->getReferenceIdForRequest($curid) : null);

if(!$searchOnly
&& !$requestedReferenceId
&& $curid
@@ -237,6 +237,9 @@ protected function doMatchRequest(bool $searchOnly=false) {
// there is no referenceId in the matchgrid entry, then we instead want
// to reprocess the record as a standard search request

// XXX Shouldn't we log matchgrid ID?
// see also PE LogBehavior

Log::write('debug', $sor . "/". $sorid . " Updating existing SOR attributes for Row ID " . $curid);

$MatchgridHistory->record($this->cur_mg->id,
@@ -425,7 +428,7 @@ protected function doMatchRequest(bool $searchOnly=false) {
}
}

$MatchService->disconnect();
$MatchService->disconnectDatabase();
}
// Coerce errors into a 400 or 500 response
catch(\InvalidArgumentException $e) {
@@ -466,10 +469,11 @@ protected function doMerge(\App\Lib\Match\MatchService $MatchService) {
// Reference ID we want to keep / merge to
$targetId = $this->request->getParam('id');

// getParsedBody could be on object, or it might be an array!
$json = $this->request->getParsedBody();

if($targetId && !empty($json->referenceIds)) {
$MatchService->merge($targetId, $json->referenceIds);
if($targetId && !empty($json['referenceIds'])) {
$MatchService->merge($targetId, $json['referenceIds']);

$this->statusCode = 200;
} else {
@@ -596,7 +600,7 @@ public function isAuthorized(Array $user) {
// Unlike most other controllers, authorization for the API is determined by
// the data available in the request.

Log::write('debug', 'TierApiController::isAuthorized() request for ' . $user['username']);
Log::write('debug', 'TapApiController::isAuthorized() request for ' . $user['username']);

// Because we're using BasicAuthenticate, $user will have the record from api_users.

@@ -609,13 +613,15 @@ public function isAuthorized(Array $user) {
// (0) Make sure the Matchgrid is active and the requested SOR exists.

if(!$this->cur_mg) {
Log::write('debug', "TierApiController::isAuthorized() Requested matchgrid " . $mgid . " not found");
throw new \Cake\Http\Exception\ForbiddenException("Requested matchgrid " . $mgid . " not found");
Log::write('debug', "TapApiController::isAuthorized() Requested matchgrid " . $mgid . " not found");
throw new \Cake\Http\Exception\ForbiddenException(__('match.er.unauthorized'));
//throw new \Cake\Http\Exception\ForbiddenException("Requested matchgrid " . $mgid . " not found");
}

if($this->cur_mg->status != StatusEnum::Active) {
Log::write('debug', "TierApiController::isAuthorized() Requested matchgrid " . $mgid . " is not Active");
throw new \Cake\Http\Exception\ForbiddenException("Requested matchgrid " . $mgid . " is not Active");
Log::write('debug', "TapApiController::isAuthorized() Requested matchgrid " . $mgid . " is not Active");
throw new \Cake\Http\Exception\ForbiddenException(__('match.er.unauthorized'));
//throw new \Cake\Http\Exception\ForbiddenException("Requested matchgrid " . $mgid . " is not Active");
}

if($sor && $mgid) {
@@ -624,15 +630,16 @@ public function isAuthorized(Array $user) {
$count = $this->SystemsOfRecord->find()->where(['matchgrid_id' => $mgid, 'label' => $sor])->count();

if($count == 0) {
Log::write('debug', "TierApiController::isAuthorized() Requested SOR " . $sor . " not found");
throw new \Cake\Http\Exception\ForbiddenException("Requested SOR " . $sor . " not found");
Log::write('debug', "TapApiController::isAuthorized() Requested SOR " . $sor . " not found");
throw new \Cake\Http\Exception\ForbiddenException(__('match.er.unauthorized'));
//throw new \Cake\Http\Exception\ForbiddenException("Requested SOR " . $sor . " not found");
}
}

// (1) A Platform API user ($user['matchgrid_id'] is NULL) may perform any action.

if(!empty($user['username']) && !$user['matchgrid_id']) {
Log::write('debug', 'TierApiController::isAuthorized() ' . $user['username'] . ' authorized as Platform API User');
Log::write('debug', 'TapApiController::isAuthorized() ' . $user['username'] . ' authorized as Platform API User');
return true;
}

@@ -643,7 +650,7 @@ public function isAuthorized(Array $user) {
&& !empty($user['matchgrid_id']) // This should always be 1 or greater since SERIAL starts at 1
&& !$user['system_of_record_id'] // This is empty for Matchgrid API users
&& $user['matchgrid_id'] == $mgid) {
Log::write('debug', 'TierApiController::isAuthorized() ' . $user['username'] . ' authorized as Matchgrid API User for Matchgrid ' . $this->cur_mg->table_name . " (" . $this->cur_mg-> id . ")");
Log::write('debug', 'TapApiController::isAuthorized() ' . $user['username'] . ' authorized as Matchgrid API User for Matchgrid ' . $this->cur_mg->table_name . " (" . $this->cur_mg-> id . ")");
return true;
}

@@ -656,11 +663,11 @@ public function isAuthorized(Array $user) {
&& !empty($sor)
&& $user['matchgrid_id'] == $mgid
&& $sor == $user['system_of_record']['label']) {
Log::write('debug', 'TierApiController::isAuthorized() ' . $user['username'] . ' authorized as System of Record API User for Matchgrid ' . $this->cur_mg->table_name . " (" . $this->cur_mg-> id . "), SOR " . $user['system_of_record']['label'] . " (" . $user['system_of_record_id']. ")");
Log::write('debug', 'TapApiController::isAuthorized() ' . $user['username'] . ' authorized as System of Record API User for Matchgrid ' . $this->cur_mg->table_name . " (" . $this->cur_mg-> id . "), SOR " . $user['system_of_record']['label'] . " (" . $user['system_of_record_id']. ")");
return true;
}

Log::write('debug', "TierApiController::isAuthorized() No authorization found for " . $user['username']);
Log::write('debug', "TapApiController::isAuthorized() No authorization found for " . $user['username']);

// XXX These are both equivalent and generate giant stack traces in the error.log
// Can we catch them somehow and prevent them from rendering?
8 changes: 5 additions & 3 deletions app/src/Lib/Identifier/ReferenceIdService.php
@@ -29,16 +29,18 @@

namespace App\Lib\Identifier;

use Doctrine\DBAL\Connection as DBALConnection;

abstract class ReferenceIdService {
/**
* Generate a Reference Identifier.
*
* @since COmanage Match v1.0.0
* @param Matchgrid $mgConfig Matchgrid Configuration
* @param ADOConnection $dbc ADODB Database Connection Handle
* @param Matchgrid $mgConfig Matchgrid Configuration
* @param DBALConnection $dbc DBAL Database Connection Handle
* @return string Reference Identifier
* @throws RuntimeException
*/

abstract public function generate(\App\Model\Entity\Matchgrid $mgConfig, \ADOConnection $dbc);
abstract public function generate(\App\Model\Entity\Matchgrid $mgConfig, DBALConnection $dbc);
}
26 changes: 13 additions & 13 deletions app/src/Lib/Identifier/Sequence.php
@@ -30,29 +30,29 @@
namespace App\Lib\Identifier;

use Cake\ORM\TableRegistry;
use Doctrine\DBAL\Connection as DBALConnection;

class Sequence extends ReferenceIdService {
/**
* Generate a Reference Identifier.
*
* @since COmanage Match v1.0.0
* @param Matchgrid $mgConfig Matchgrid Configuration
* @param ADOConnection $dbc ADODB Database Connection Handle
* @param Matchgrid $mgConfig Matchgrid Configuration, with MatchgridSettings contain()d
* @param DBALConnection $dbc DBAL Database Connection Handle
* @return string Reference Identifier
* @throws RuntimeException
*/

public function generate(\App\Model\Entity\Matchgrid $mgConfig, \ADOConnection $dbc) {
$MatchgridSettings = TableRegistry::getTableLocator()->get('MatchgridSettings');
public function generate(\App\Model\Entity\Matchgrid $mgConfig, DBALConnection $dbc) {
// The prefix is optional and configured by the admin
$prefix = $mgConfig->matchgrid_setting->getReferenceIdPrefix($mgConfig->id);

// We'll use the matchgrid ID rather than name in the sequence name to avoid
// issues if the matchgrid is renamed for some reason.

$seq = "mg_seq_" . (string)$mgConfig->id;
$prefix = $MatchgridSettings->getReferenceIdPrefix($mgConfig->id);

$refId = $prefix . (string)$dbc->genId($seq, $MatchgridSettings->getReferenceIdStart($mgConfig->id));

return $refId;
$sql = "SELECT nextval(' . $mgConfig->matchgrid_setting->ref_id_sequence_name . ')";

$stmt = $dbc->Prepare($sql);

$resultSet = $stmt->executeQuery();

return $prefix . $resultSet->fetchOne();
}
}
8 changes: 5 additions & 3 deletions app/src/Lib/Identifier/Uuid.php
@@ -29,18 +29,20 @@

namespace App\Lib\Identifier;

use Doctrine\DBAL\Connection as DBALConnection;

class Uuid extends ReferenceIdService {
/**
* Generate a Reference Identifier.
*
* @since COmanage Match v1.0.0
* @param Matchgrid $mgConfig Matchgrid Configuration
* @param ADOConnection $dbc ADODB Database Connection Handle
* @param Matchgrid $mgConfig Matchgrid Configuration
* @param DBALConnection $dbc DBAL Database Connection Handle
* @return string Reference Identifier
* @throws RuntimeException
*/

public function generate(\App\Model\Entity\Matchgrid $mgConfig, \ADOConnection $dbc) {
public function generate(\App\Model\Entity\Matchgrid $mgConfig, DBALConnection $dbc) {
// GUID generation based on https://stackoverflow.com/questions/2040240/php-function-to-generate-v4-uuid

// could use openssl_random_pseudo_bytes(16)
251 changes: 138 additions & 113 deletions app/src/Lib/Match/MatchService.php

Large diffs are not rendered by default.

63 changes: 17 additions & 46 deletions app/src/Lib/Match/MatchgridBuilder.php
@@ -29,35 +29,38 @@

namespace App\Lib\Match;

use Cake\Datasource\ConnectionManager;
use Cake\Datasource\EntityInterface;

use Doctrine\DBAL\Connection as DBALConnection;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\SchemaException;
use App\Lib\Enum\ReferenceIdEnum;

class MatchgridBuilder {
use \App\Lib\Traits\DatabaseTrait;

/**
* Build the requested Matchgrid.
*
* @since COmanage Match v1.0.0
* @param EntityInterface $Matchgrid Matchgrid Object
* @param array $attributes Array of Attributes
* @param bool $indexes Whether to build indexes (disable for bulk loading only)
* @param EntityInterface $Matchgrid Matchgrid Object, contain()d to include MatchgridSettings
* @param array $attributes Array of Attributes
* @param bool $indexes Whether to build indexes (disable for bulk loading only)
* @throws SchemaException|DBALException|Exception
*/

public function build(EntityInterface $Matchgrid, array $attributes, bool $indexes=true): void
{
// Connect to the database
$dbc = $this->connect();
$dbc = $this->connectDatabase();

// Build and execute the schema
$this->configToSchema($dbc, $Matchgrid, $attributes, $indexes);

$this->disconnectDatabase();
}

/**
@@ -142,6 +145,14 @@ protected function configToSchema(
}
}
}

// If the Matchgrid uses Sequence for the referenceid_method, create the sequence
if($Matchgrid->matchgrid_setting->referenceid_method == ReferenceIdEnum::Sequence) {
$schema->createSequence($Matchgrid->matchgrid_setting->ref_id_sequence_name,
1,
$Matchgrid->matchgrid_setting->referenceid_start);
}
// else we could dropSequence, but for now we'll leave abandoned sequences in place

// We're done with the table assembly, so move on to running the schema.

@@ -191,44 +202,4 @@ protected function configToSchema(
$stmt = $dbc->executeQuery($sql);
}
}

/**
* Connect to the Database.
*
* @since COmanage Match v1.0.0
* @return DBALConnection
* @throws DBALException|Exception
*/

protected function connect(): DBALConnection
{
// There's some overlap between here and DatabaseCommand.

// Use the ConnectionManager to get the database config to pass to adodb.
$db = ConnectionManager::get('default');

// $db is a ConnectionInterface object
$cfg = $db->config();

// We only support Postgres (at least for now)
if($cfg['driver'] !== "Cake\Database\Driver\Postgres") {
throw new \RuntimeException(__('match.er.db.driver' , [ $cfg['driver'] ]));
}

// Map CAKE DB drivers to PHP DB drivers
$driver = [
'Cake\Database\Driver\Postgres' => 'pdo_pgsql',
'Cake\Database\Driver\Mysql' => 'pdo_mysql',
];

$cfargs = [
'dbname' => $cfg['database'],
'user' => $cfg['username'],
'password' => $cfg['password'],
'host' => $cfg['host'],
'driver' => $driver[ $cfg['driver'] ]
];

return DriverManager::getConnection($cfargs);
}
}
@@ -1,6 +1,6 @@
<?php
/**
* COmanage Match Match Service
* COmanage Match Database Trait
*
* Portions licensed to the University Corporation for Advanced Internet
* Development, Inc. ("UCAID") under one or more contributor license agreements.
@@ -19,69 +19,74 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @link http://www.internet2.edu/comanage COmanage Project
* @link https://www.internet2.edu/comanage COmanage Project
* @package match
* @since COmanage Match v1.0.0
* @since COmanage Match v1.1.0
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
*/

declare(strict_types = 1);

namespace App\Lib\Match;
namespace App\Lib\Traits;

use Cake\Datasource\ConnectionInterface;
use Cake\Datasource\ConnectionManager;
use Doctrine\DBAL\Connection as DBALConnection;
use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\DriverManager;

trait DatabaseTrait {
protected $dbcxn = null;

class PostgresService {
protected $dbc = null;

/**
* Connect to the configured database.
* Connect to the Database.
*
* @since COmanage Match v1.0.0
* @return AdoConnection ADOdb Database Connection object
* @throws RuntimeException
* @since COmanage Match v1.1.0
* @return DBALConnection
* @throws DBALException|Exception
*/

public function connect() {
// There's some overlap between here and DatabaseShell.

// Use the ConnectionManager to get the database config to pass to adodb.
public function connectDatabase(): DBALConnection
{
// Use the ConnectionManager to get the database config to pass to DBAL.
$db = ConnectionManager::get('default');

// $db is a ConnectionInterface object
$cfg = $db->config();

// We only support Postgres (at least for now)
if($cfg['driver'] != "Cake\Database\Driver\Postgres") {
if($cfg['driver'] !== "Cake\Database\Driver\Postgres") {
throw new \RuntimeException(__('match.er.db.driver' , [ $cfg['driver'] ]));
}

// // This really imples postgres8+
$this->dbc = ADONewConnection('postgres9');

if(!$this->dbc->Connect($cfg['host'],
$cfg['username'],
$cfg['password'],
$cfg['database'])) {
throw new \RuntimeException(__('match.er.db.connect', [$this->dbc->ErrorMsg()]));
}
// Map CAKE DB drivers to PHP DB drivers
$driver = [
'Cake\Database\Driver\Postgres' => 'pdo_pgsql',
'Cake\Database\Driver\Mysql' => 'pdo_mysql',
];

// We only want keys based on column names
$this->dbc->setFetchMode(ADODB_FETCH_ASSOC);
$cfargs = [
'dbname' => $cfg['database'],
'user' => $cfg['username'],
'password' => $cfg['password'],
'host' => $cfg['host'],
'driver' => $driver[ $cfg['driver'] ]
];

return $this->dbc;
$this->dbcxn = DriverManager::getConnection($cfargs);

return $this->dbcxn;
}

/**
* Disconnect from the database.
*
* @since COmanage Match v1.0.0
* Disconnect from the Database.
*
* @since COmanage Match v1.1.0
*/

public function disconnect() {
if($this->dbc) {
$this->dbc->Disconnect();
}

public function disconnectDatabase() {
// DBAL doesn't have a disconnect option
$this->dbcxn = null;

return;
}
}
}
14 changes: 14 additions & 0 deletions app/src/Model/Entity/MatchgridSetting.php
@@ -37,4 +37,18 @@ class MatchgridSetting extends Entity {
'id' => false,
'slug' => false,
];

/**
* Determine the name of the sequence used to manage the Reference ID.
*
* @since COmanage Match v1.1.0
* @return string Reference ID Sequence name
*/

protected function _getRefIdSequenceName() {
// We'll use the matchgrid ID rather than name in the sequence name to avoid
// issues if the matchgrid is renamed for some reason.

return "mg_seq_" . (string)$this->matchgrid_id;
}
}
3 changes: 2 additions & 1 deletion app/src/Model/Table/MatchgridsTable.php
@@ -157,7 +157,8 @@ public function findActiveMatchgrids(Query $query, array $options) {
public function getMatchgridConfig($id) {
return $this->get($id,
['contain' => [
'Attributes' => 'AttributeGroups'
'Attributes' => 'AttributeGroups',
'MatchgridSettings'
]]);
}

File renamed without changes.
@@ -1,6 +1,6 @@
<?php
/**
* COmanage Match TierApi Response Template
* COmanage Match TapApi Response Template
*
* Portions licensed to the University Corporation for Advanced Internet
* Development, Inc. ("UCAID") under one or more contributor license agreements.
@@ -19,7 +19,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @link http://www.internet2.edu/comanage COmanage Project
* @link https://www.internet2.edu/comanage COmanage Project
* @package match
* @since COmanage Match v1.0.0
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
22 changes: 0 additions & 22 deletions app/vendor/adodb/adodb-php/.editorconfig

This file was deleted.

499 changes: 0 additions & 499 deletions app/vendor/adodb/adodb-php/LICENSE.md

This file was deleted.

103 changes: 0 additions & 103 deletions app/vendor/adodb/adodb-php/README.md

This file was deleted.

45 changes: 0 additions & 45 deletions app/vendor/adodb/adodb-php/SECURITY.md

This file was deleted.

1,210 changes: 0 additions & 1,210 deletions app/vendor/adodb/adodb-php/adodb-active-record.inc.php

This file was deleted.

1,489 changes: 0 additions & 1,489 deletions app/vendor/adodb/adodb-php/adodb-active-recordx.inc.php

This file was deleted.

321 changes: 0 additions & 321 deletions app/vendor/adodb/adodb-php/adodb-csvlib.inc.php

This file was deleted.

1,107 changes: 0 additions & 1,107 deletions app/vendor/adodb/adodb-php/adodb-datadict.inc.php

This file was deleted.

277 changes: 0 additions & 277 deletions app/vendor/adodb/adodb-php/adodb-error.inc.php

This file was deleted.

85 changes: 0 additions & 85 deletions app/vendor/adodb/adodb-php/adodb-errorhandler.inc.php

This file was deleted.

95 changes: 0 additions & 95 deletions app/vendor/adodb/adodb-php/adodb-errorpear.inc.php

This file was deleted.

87 changes: 0 additions & 87 deletions app/vendor/adodb/adodb-php/adodb-exceptions.inc.php

This file was deleted.

1,338 changes: 0 additions & 1,338 deletions app/vendor/adodb/adodb-php/adodb-lib.inc.php

This file was deleted.

813 changes: 0 additions & 813 deletions app/vendor/adodb/adodb-php/adodb-loadbalancer.inc.php

This file was deleted.

420 changes: 0 additions & 420 deletions app/vendor/adodb/adodb-php/adodb-memcache.lib.inc.php

This file was deleted.

285 changes: 0 additions & 285 deletions app/vendor/adodb/adodb-php/adodb-pager.inc.php

This file was deleted.

377 changes: 0 additions & 377 deletions app/vendor/adodb/adodb-php/adodb-pear.inc.php

This file was deleted.

1,081 changes: 0 additions & 1,081 deletions app/vendor/adodb/adodb-php/adodb-perf.inc.php

This file was deleted.

1,480 changes: 0 additions & 1,480 deletions app/vendor/adodb/adodb-php/adodb-time.inc.php

This file was deleted.

2,203 changes: 0 additions & 2,203 deletions app/vendor/adodb/adodb-php/adodb-xmlschema.inc.php

This file was deleted.

2,400 changes: 0 additions & 2,400 deletions app/vendor/adodb/adodb-php/adodb-xmlschema03.inc.php

This file was deleted.

5,795 changes: 0 additions & 5,795 deletions app/vendor/adodb/adodb-php/adodb.inc.php

This file was deleted.

41 changes: 0 additions & 41 deletions app/vendor/adodb/adodb-php/composer.json

This file was deleted.

112 changes: 0 additions & 112 deletions app/vendor/adodb/adodb-php/datadict/datadict-access.inc.php

This file was deleted.

218 changes: 0 additions & 218 deletions app/vendor/adodb/adodb-php/datadict/datadict-db2.inc.php

This file was deleted.

283 changes: 0 additions & 283 deletions app/vendor/adodb/adodb-php/datadict/datadict-firebird.inc.php

This file was deleted.

0 comments on commit d1cf34d

Please sign in to comment.