Skip to content

Commit

Permalink
Implement SystemOfRecord trust_mode (CO-2534)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Apr 1, 2023
1 parent be1e36c commit de23813
Show file tree
Hide file tree
Showing 14 changed files with 507 additions and 27 deletions.
2 changes: 1 addition & 1 deletion app/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
*/
'Error' => [
'errorLevel' => E_ALL,
'exceptionRenderer' => ExceptionRenderer::class,
//'exceptionRenderer' => ExceptionRenderer::class,
'skipLog' => [],
'log' => true,
'trace' => true,
Expand Down
11 changes: 4 additions & 7 deletions app/config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
use Cake\Database\TypeFactory;
use Cake\Database\Type\StringType;
use Cake\Datasource\ConnectionManager;
use Cake\Error\ConsoleErrorHandler;
use Cake\Error\ErrorHandler;
use Cake\Error\ErrorTrap;
use Cake\Error\ExceptionTrap;
use Cake\Http\ServerRequest;
use Cake\Log\Log;
use Cake\Mailer\Mailer;
Expand Down Expand Up @@ -128,11 +128,8 @@
* Register application error and exception handlers.
*/
$isCli = PHP_SAPI === 'cli';
if ($isCli) {
(new ConsoleErrorHandler(Configure::read('Error')))->register();
} else {
(new ErrorHandler(Configure::read('Error')))->register();
}
(new ErrorTrap(Configure::read('Error')))->register();
(new ExceptionTrap(Configure::read('Error')))->register();

/*
* Include the CLI bootstrap overrides.
Expand Down
1 change: 1 addition & 0 deletions app/config/schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
"id": {},
"matchgrid_id": {},
"label": { "type": "string", "size": 64 },
"trust_mode": { "type": "string", "size": 2 },
"resolution_mode": { "type": "string", "size": 2 },
"notification_email": { "type": "string", "size": 80 }
},
Expand Down
54 changes: 54 additions & 0 deletions app/resources/locales/en_US/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ msgid "match.banner.api_users.platform"
msgstr "This page is for configuring Platform API Users, which have full read/write access to the entire platform. To create API Users restricted to a given Matchgrid, go to the management page for the desired Matchgrid and select <i>API Users</i> from there.<hr />The Match API is available at {0}"

### Command Line text
msgid "match.cmd.arg.version"
msgstr "Version to upgrade to (default: current RELEASE)"

msgid "match.cmd.bl.index.off"
msgstr "Dropping matchgrid indexes..."

Expand Down Expand Up @@ -83,12 +86,21 @@ msgstr "Username of initial platform administrator"
msgid "match.cmd.opt.force"
msgstr "Force a rerun of setup (only if you know what you are doing)"

msgid "match.cmd.opt.forcecurrent"
msgstr "Force the specified current version -- ADVANCED USERS ONLY"

msgid "match.cmd.opt.not"
msgstr "Calculate changes but do not apply"

msgid "match.cmd.opt.skip-match"
msgstr "Do not run Match Rules while processing records"

msgid "match.cmd.opt.skipdatabase"
msgstr "Skip database schema update -- ADVANCED USERS ONLY"

msgid "match.cmd.opt.skipvalidation"
msgstr "Skip version validation -- ADVANCED USERS ONLY"

msgid "match.cmd.se.admin"
msgstr "- Creating initial administrator permission"

Expand All @@ -101,6 +113,24 @@ msgstr "Setup appears to have already run"
msgid "match.cmd.se.salt"
msgstr "- Generating salt file"

msgid "match.cmd.ug.current"
msgstr "Current version: {0}"

msgid "match.cmd.ug.ok"
msgstr "Upgrade completed successfully"

msgid "match.cmd.ug.post"
msgstr "Executing post-database step ({0})"

msgid "match.cmd.ug.pre"
msgstr "Executing pre-database step ({0})"

msgid "match.cmd.ug.target"
msgstr "Target version: {0}"

msgid "match.cmd.ug.120.trust_mode"
msgstr "- Populating default values for trust_mode"

### Controllers (Models)
msgid "match.ct.ApiUsers"
msgstr "{0,plural,=1{API User} other{API Users}}"
Expand Down Expand Up @@ -245,6 +275,12 @@ msgstr "Suspended"
msgid "match.en.StatusEnum.S.badge"
msgstr "Danger"

msgid "match.en.TrustModeEnum.S"
msgstr "Standard"

msgid "match.en.TrustModeEnum.T"
msgstr "Trust"

### Error Messages
msgid "match.er.args"
msgstr "Incorrect arguments provided to {0}"
Expand All @@ -258,6 +294,21 @@ msgstr "Error at line {0}: {1}"
msgid "match.er.build"
msgstr "Error applying matchgrid schema: {0}"

msgid "match.er.cmd.ug.blocked"
msgstr "Cannot automatically upgrade past version {0}. Please upgrade to that version first."

msgid "match.er.cmd.ug.fail"
msgstr "ERROR: Upgrade failed"

msgid "match.er.cmd.ug.order"
msgstr "Target version is before current version (cannot downgrade)"

msgid "match.er.cmd.ug.same"
msgstr "Current and target versions are the same"

msgid "match.er.cmd.ug.version"
msgstr "Unknown version \"{0}\""

msgid "match.er.db.connect"
msgstr "Failed to connect to database: {0}"

Expand Down Expand Up @@ -561,6 +612,9 @@ msgstr "Table Name"
msgid "match.fd.table_name.desc"
msgstr "Unique name for matchgrid, must be a valid SQL identifier (will be prefixed mg_ for actual table name)"

msgid "match.fd.trust_mode"
msgstr "Trust Mode"

msgid "match.fd.url"
msgstr "URL"

Expand Down
Loading

0 comments on commit de23813

Please sign in to comment.