Skip to content

Feature cfm31 #261

Merged
merged 78 commits into from Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
c7ca1ab
Initial implementation of Enrollment Flow infrastructure and Attribut…
Feb 27, 2024
a8fed36
Miscellaneous Enrollment fixes (CFM-31)
Feb 28, 2024
8bf3414
Refactor EnrollmentFlow* files:setPermissions
Ioannis Mar 3, 2024
2aa6c9a
Add top-level subnavigation to Enrollment Flow and Enrollment Flow St…
arlen Mar 7, 2024
ffa94f8
Add main-menu navigation for Petitions and Enrollments (CFM-31)
arlen Mar 8, 2024
8ffdf5d
Add titles to Petition steps and buttons to the steps index (CFM-31) …
arlen Mar 13, 2024
3f20fea
Simplify end-user Petition views (CFM-31) (#175)
arlen Mar 13, 2024
e721c61
Subnavigation fix for Enrollment Flow steps (CFM-31) (#177)
arlen Mar 27, 2024
23f0fd0
Post-rebase vs. develop corrections (CFM-31)
arlen Aug 14, 2024
a17e752
Update AttributeCollectors permissions definition (CFM-31)
Sep 22, 2024
3c5cba1
fix EnrollmetFlow and EnrollmentFlowSteps fields
Ioannis Sep 23, 2024
664a571
Fix EnrollmentAttributes fiels
Ioannis Sep 24, 2024
a391258
lookupPersonByLogin vs lookupPersonForLogin fix
Ioannis Sep 24, 2024
092641a
Render Enrollment Attributes edit/add/view in a modal
Ioannis Sep 24, 2024
1ac9108
remove duplicate field
Ioannis Sep 24, 2024
00e431f
Correct test for $rowActions post-rebase. (CFM-31)
arlen Sep 24, 2024
373d5a4
feature-cfm31-subnavigation (#217)
Ioannis Sep 26, 2024
a4b7b48
Fix EnrollmentFlow broken start view. Fix petitions view.
Ioannis Sep 27, 2024
a6664bc
Fix dispatch View to use the new FieldHelper.php
Ioannis Sep 27, 2024
50cbeb3
Fix missing curly brach error
Ioannis Sep 27, 2024
e69aeb4
Improve Form global edit mode handling
Ioannis Sep 27, 2024
82d52da
Fix petition view issue
Ioannis Sep 27, 2024
6aa0432
Add filter block for Enrollment Flows and Petitions
Ioannis Sep 27, 2024
0f95b3e
Filter Petitions by COU
Ioannis Sep 27, 2024
2acb6b1
Make dispatch view editable
Ioannis Sep 27, 2024
e0fd533
Add petition "start" action to $isActivePetition boolean in default.p…
arlen Sep 27, 2024
d4b6e43
Add enrollment attribute view should redirect to "self" (CFM-31) (#219)
arlen Sep 27, 2024
2c9d08a
Remove deprecated subnavigation config (CFM-31) (#220)
arlen Sep 27, 2024
0d7ebfc
fix iframe flash message rendering
Ioannis Sep 27, 2024
0b2965e
Simple fix for h1 title (CFM-31) (#221)
arlen Sep 27, 2024
1580ea0
Ensure a title exists on Petition start, dispatch, and resume (CFM-31…
arlen Sep 27, 2024
65ba066
Remove unnecessary top-link from Enrollment Flow properties (CFM-31) …
arlen Sep 27, 2024
64c39ed
fix deep nested navigation tab id calculation
Ioannis Sep 28, 2024
3a5f3f2
Add TabHelper missing dependency
Ioannis Sep 29, 2024
45fd27e
Refactor Enrollment Attributes Add/Edit view (#224)
Ioannis Sep 30, 2024
d74d411
Fix wrong url id harvest (#225)
Ioannis Sep 30, 2024
0377da5
Set petition titles (Enrollment Flow name, Flow Step description) in …
arlen Sep 30, 2024
f4d6889
fix subnavigation issues (#228)
Ioannis Oct 1, 2024
ba3a6b8
Cleanup to subnavigation and titling (CFM-31) (#229)
arlen Oct 2, 2024
1f195f3
Initial implementation of BasicAttributeCollector (CFM-415) (#231)
benno Oct 3, 2024
ac46c03
Subnavigation fixes (#230)
Ioannis Oct 3, 2024
e7ff552
Fix field config for select elements in Pipelines and Message Templat…
arlen Oct 10, 2024
2111942
fix FieldHelper.php fieldType missing fieldSelectOptions issue
Ioannis Oct 14, 2024
1db6c9a
Fix tab rendering for EnrollmentFlow plugins (#235)
Ioannis Oct 14, 2024
ab01d71
Conditionally include a 'Cancel' button next to 'Save' (CFM-31) (#236)
arlen Oct 14, 2024
60451d7
Fix use case:Plugin.Hierarchy deep nested when no hasMany association.
Ioannis Oct 15, 2024
9c40b25
Check for hasMany associations before rendering a tab
Ioannis Oct 16, 2024
b2b4fdc
Fix misspelled variable
Ioannis Oct 21, 2024
7fb0393
Fix Petition Attributes Form rendering (#241)
Ioannis Oct 23, 2024
018b096
Initial theme commit for Enrollment Flow Attribute Collector (CFM-31)…
arlen Oct 23, 2024
7be2adf
Update of attribute collector list-element class names for better con…
arlen Oct 23, 2024
ebb11a8
Fix Attribute Collectors dispatch view dependency data
Ioannis Oct 24, 2024
60bdb3c
Select attribute fields by css class name (CFM-31) (#245)
arlen Oct 24, 2024
21c4ecc
Initial commit of Mostly Static Pages (CFM-62), InvitationAccepter (C…
Oct 31, 2024
117fca4
Initial implementation of Identifier Collector Enroller (CFM-111)
Nov 3, 2024
d6f7167
Update attribute collector CSS selectors to reflect updated DOM class…
arlen Nov 6, 2024
228b76e
First pass at cleaning up Petition view (CFM-31) (#246)
arlen Nov 8, 2024
835170f
Add support for attribute collection fieldsets (#244)
Ioannis Nov 13, 2024
3f58c6f
Switch to Material Symbols (CFM-404) (#248)
arlen Nov 13, 2024
29364c0
Style Basic Attribute Collector and ensure that names and telephone n…
arlen Nov 15, 2024
92abee3
Fix flash error construction.name type_id field is required
Ioannis Nov 15, 2024
bbaa7c4
method parameters must not come before the required ones as of php 8.1
Ioannis Nov 15, 2024
7b59fd5
cfm-31_people-picker (#250)
Ioannis Nov 18, 2024
15ff5c9
Add special "Start" button to Enrollment Flow views (CFM-428) (#251)
arlen Nov 21, 2024
5ac5cf3
Small stylistic improvements to Enrollment Flow dispatch and start vi…
arlen Nov 21, 2024
a944cee
Improve Petition index and add a label prefix config for index view (…
arlen Nov 21, 2024
673a17f
Allow null coid for AutoViewVarsTrait (nojira)
arlen Nov 22, 2024
9b0b36c
Make Add drop-down menu a panel. Also fix welcome message and main me…
arlen Nov 27, 2024
e45bd43
Initial commit of Email Verifier Enroller Plugin (CFM-333)
Nov 28, 2024
9a8d6ae
Additional commit for CFM-333
Nov 28, 2024
60acd30
Implement finalization tasks (CFM-31)
Nov 28, 2024
3f63b34
Provide better evaluations in upperButtons start enrollment flow link…
arlen Dec 4, 2024
cdf0409
fix rebase remaining message
Ioannis Dec 16, 2024
d282d67
feature-cfm31 post rebase fixes #1 (#262)
arlen Dec 17, 2024
7bfdeec
Fix URLs missing associations. Improving mvea tile render on error.
Ioannis Dec 18, 2024
8a18879
Add UrlsTable missing changes.
Ioannis Dec 18, 2024
5436748
feature-cfm31 post rebase fixes2 (#264)
arlen Dec 19, 2024
50e86b1
Merge pull request #263 from Ioannis/ExternalIdentityRoles_associatio…
Ioannis Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -30,11 +30,34 @@
namespace FileConnector\Controller;

use App\Controller\StandardPluginController;
use Cake\Event\EventInterface;
use Cake\Http\Response;

class FileSourcesController extends StandardPluginController {
public $paginate = [
'order' => [
'FileSources.id' => 'asc'
]
];

/**
* Callback run prior to the request render.
*
* @param EventInterface $event Cake Event
*
* @return Response|void
* @since COmanage Registry v5.0.0
*/

public function beforeRender(EventInterface $event) {
$link = $this->getPrimaryLink(true);

if(!empty($link->value)) {
$this->set('vv_bc_parent_obj', $this->FileSources->ExternalIdentitySources->get($link->value));
$this->set('vv_bc_parent_displayfield', $this->FileSources->ExternalIdentitySources->getDisplayField());
$this->set('vv_bc_parent_primarykey', $this->FileSources->ExternalIdentitySources->getPrimaryKey());
}

return parent::beforeRender($event);
}
}
Expand Up @@ -44,7 +44,8 @@ class FileSourcesTable extends Table {
use \App\Lib\Traits\PrimaryLinkTrait;
use \App\Lib\Traits\TableMetaTrait;
use \App\Lib\Traits\ValidationTrait;

use \App\Lib\Traits\TabTrait;

// Cache of the field configuration
protected $fieldCfg = null;

Expand Down Expand Up @@ -78,6 +79,23 @@ public function initialize(array $config): void {
]
]);

// All the tabs share the same configuration in the ModelTable file
$this->setTabsConfig(
[
// Ordered list of Tabs
'tabs' => ['ExternalIdentitySources', 'FileConnector.FileSources', 'ExternalIdentitySources@action.search'],
// What actions will include the subnavigation header
'action' => [
// If a model renders in a subnavigation mode in edit/view mode, it cannot
// render in index mode for the same use case/context
// XXX edit should go first.
'ExternalIdentitySources' => ['edit', 'view', 'search'],
'FileConnector.FileSources' => ['edit'],
'ExternalIdentitySources@action.search' => [],
],
]
);

$this->setPermissions([
// Actions that operate over an entity (ie: require an $id)
'entity' => [
Expand Down
2 changes: 2 additions & 0 deletions app/composer.json
Expand Up @@ -32,6 +32,7 @@
"App\\": "src/",
"ApiConnector\\": "availableplugins/ApiConnector/src/",
"CoreAssigner\\": "plugins/CoreAssigner/src/",
"CoreEnroller\\": "plugins/CoreEnroller/src/",
"CoreServer\\": "plugins/CoreServer/src/",
"FileConnector\\": "availableplugins/FileConnector/src/",
"PipelineToolkit\\": "availableplugins/PipelineToolkit/src/",
Expand All @@ -45,6 +46,7 @@
"ApiConnector\\Test\\": "availableplugins/ApiConnector/tests/",
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/",
"CoreAssigner\\Test\\": "plugins/CoreAssigner/tests/",
"CoreEnroller\\Test\\": "plugins/CoreEnroller/tests/",
"CoreServer\\Test\\": "plugins/CoreServer/tests/",
"FileConnector\\Test\\": "availableplugins/FileConnector/tests/",
"PipelineToolkit\\Test\\": "availableplugins/PipelineToolkit/tests/",
Expand Down
14 changes: 14 additions & 0 deletions app/config/routes.php
Expand Up @@ -168,6 +168,20 @@ function (RouteBuilder $builder) {
* ...and connect the rest of 'Pages' controller's URLs.
*/
$builder->connect('/pages/*', ['controller' => 'Pages', 'action' => 'display']);

/**
* Registry allows URLs of the form /coid/name to render as a Mostly Static Page.
*
* Note this will effectively route any URL of the form /registry/x, where x consists of
* digits, to the Pages controller. We need to filter on digits, or we'll end up taking
* over all controllers as well. (The implication is we can't have a controller whose
* name consists entirely of digits, but we probably shouldn't...)
*/
$builder->connect(
'/{coid}/{name}',
['controller' => 'Pages', 'action' => 'show' ],
['coid' => '\d+', 'pass' => ['coid', 'name']]
);

/*
* Connect catchall routes for all controllers.
Expand Down
136 changes: 131 additions & 5 deletions app/config/schema/schema.json
Expand Up @@ -9,12 +9,14 @@
"comment": "Columns with names matching those defined here will by default inherit these properties",

"columns": {
"action": { "type": "string", "size": 4 },
"api_user_id": { "type": "integer", "foreignkey": { "table": "api_users", "column": "id" } },
"co_id": { "type": "integer", "foreignkey": { "table": "cos", "column": "id" }, "notnull": true },
"comment": { "type": "string", "size": 256 },
"context": { "type": "string", "size": 2 },
"cou_id": { "type": "integer", "foreignkey": { "table": "cous", "column": "id" } },
"description": { "type": "string", "size": 128 },
"enrollment_flow_step_id": { "type": "integer", "foreignkey": { "table": "enrollment_flow_steps", "column": "id" } },
"external_identity_id": { "type": "integer", "foreignkey": { "table": "external_identities", "column": "id" } },
"external_identity_role_id": { "type": "integer", "foreignkey": { "table": "external_identity_roles", "column": "id" } },
"external_identity_source_id": { "type": "integer", "foreignkey": { "table": "external_identity_sources", "column": "id" } },
Expand All @@ -23,15 +25,19 @@
"id": { "type": "integer", "autoincrement": true, "primarykey": true },
"identifier_assignment_id": { "type": "integer", "foreignkey": { "table": "identifier_assignments", "column": "id" }, "notnull": true },
"language": { "type": "string", "size": 16 },
"mail": { "type": "string", "size": 256 },
"message_template_id": { "type": "integer", "foreignkey": { "table": "message_templates", "column": "id" } },
"name": { "type": "string", "size": 128, "notnull": true },
"ordr": { "type": "integer" },
"person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" } },
"person_role_id": { "type": "integer", "foreignkey": { "table": "person_roles", "column": "id" } },
"petition_id": { "type": "integer", "foreignkey": { "table": "petitions", "column": "id" } },
"plugin": { "type": "string", "size": 80 },
"provisioning_target_id": { "type": "integer", "foreignkey": { "table": "provisioning_targets", "column": "id" }, "notnull": true },
"reference_identifier": { "type": "string", "size": 40 },
"report_id": { "type": "integer", "foreignkey": { "table": "reports", "column": "id" }, "notnull": true },
"server_id": { "type": "integer", "foreignkey": { "table": "servers", "column": "id" }, "notnull": true },
"sor_label": { "type": "string", "size": 40 },
"status": { "type": "string", "size": 2 },
"type_id": { "type": "integer", "foreignkey": { "table": "types", "column": "id" }, "notnull": true },
"valid_from": { "type": "datetime" },
Expand Down Expand Up @@ -397,11 +403,11 @@
"mvea": [ "person", "person_role", "external_identity", "external_identity_role" ],
"sourced": true
},

"email_addresses": {
"columns": {
"id": {},
"mail": { "type": "string", "size": 256 },
"mail": {},
"description": {},
"type_id": {},
"verified": { "type": "boolean" }
Expand Down Expand Up @@ -510,15 +516,15 @@
"indexes": {
"urls_i1": { "columns": [ "type_id" ] }
},
"mvea": [ "person", "external_identity" ],
"mvea": [ "person", "person_role", "external_identity", "external_identity_role" ],
"sourced": true
},

"history_records": {
"columns": {
"id": {},
"action": { "type": "string", "size": 4 },
"comment": { "type": "string", "size": 256 },
"action": {},
"comment": {},
"person_id": {},
"person_role_id": {},
"external_identity_id": {},
Expand Down Expand Up @@ -594,6 +600,126 @@
}
},

"mostly_static_pages": {
"columns": {
"id": {},
"co_id": {},
"name": {},
"title": { "type": "string", "size": 256 },
"description": {},
"status": {},
"context": {},
"body": { "type": "text" }
},
"indexes": {
"mostly_static_pages_i1": { "columns": [ "co_id" ] }
}
},

"enrollment_flows": {
"columns": {
"id": {},
"co_id": {},
"name": {},
"status": {},
"sor_label": {},
"authz_type": { "type": "string", "size": 2 },
"authz_cou_id": { "type": "integer", "foreignkey": { "table": "cous", "column": "id" }},
"authz_group_id": { "type": "integer", "foreignkey": { "table": "groups", "column": "id" }},
"collect_enrollee_email": { "type": "boolean" },
"redirect_on_finalize": { "type": "string", "size": 256 }
},
"indexes": {
"enrollment_flows_i1": { "columns": [ "co_id" ]},
"enrollment_flows_i2": { "needed": false, "columns": [ "authz_cou_id" ]},
"enrollment_flows_i3": { "needed": false, "columns": [ "authz_group_id" ]}
}
},

"enrollment_flow_steps": {
"columns": {
"id": {},
"enrollment_flow_id": { "type": "integer", "foreignkey": { "table": "enrollment_flows", "column": "id" }},
"description": {},
"status": {},
"plugin": {},
"ordr": {},
"actor_type": { "type": "string", "size": 2 },
"message_template_id": {},
"redirect_on_handoff": { "type": "string", "size": 256 }
},
"indexes": {
"enrollment_flow_steps_i1": { "columns": [ "enrollment_flow_id" ]},
"enrollment_flow_steps_i2": { "needed": false, "columns": [ "message_template_id" ]}
}
},

"petitions": {
"columns": {
"id": {},
"enrollment_flow_id": { "type": "integer", "foreignkey": { "table": "enrollment_flows", "column": "id" }},
"status": {},
"cou_id": {},
"enrollee_email": { "type": "string", "size": 256 },
"enrollee_identifier": { "type": "string", "size": 256 },
"enrollee_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" }},
"petitioner_identifier": { "type": "string", "size": 256 },
"petitioner_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" }},
"token": { "type": "string", "size": 256 }
},
"indexes": {
"petitions_i1": { "columns": [ "enrollment_flow_id" ]},
"petitions_i2": { "columns": [ "cou_id" ]},
"petitions_i3": { "columns": [ "enrollee_person_id" ]},
"petitions_i4": { "columns": [ "petitioner_person_id" ]}
}
},

"petition_step_results": {
"columns": {
"id": {},
"petition_id": {},
"enrollment_flow_step_id": {},
"comment": {}
},
"indexes": {
"petition_step_results_i1": { "columns": [ "petition_id" ] },
"petition_step_results_i2": { "needed": false, "columns": [ "enrollment_flow_step_id" ] }
}
},

"petition_history_records": {
"columns": {
"id": {},
"petition_id": {},
"enrollment_flow_step_id": {},
"action": {},
"comment": {},
"actor_person_id": { "type": "integer", "foreignkey": { "table": "people", "column": "id" } }
},
"indexes": {
"petition_history_records_i1": { "columns": [ "petition_id" ] },
"petition_history_records_i2": { "columns": [ "actor_person_id" ] },
"petition_history_records_i3": { "needed": false, "columns": [ "enrollment_flow_step_id" ] }
}
},

"verifications": {
"columns": {
"id": {},
"code": { "type": "string", "size": 32 },
"verification_time": { "type": "datetime" },
"request_expiration_time": { "type": "datetime" },
"method": { "type": "string", "size": 2 },
"email_address_id": { "type": "integer", "foreignkey": { "table": "email_addresses", "column": "id" } },
"petition_id": {}
},
"indexes": {
"verifications_i1": { "columns": [ "email_address_id" ] },
"verifications_i2": { "columns": [ "petition_id" ] }
}
},

"jobs": {
"columns": {
"id": {},
Expand Down
24 changes: 24 additions & 0 deletions app/plugins/CoreEnroller/composer.json
@@ -0,0 +1,24 @@
{
"name": "your-name-here/core-enroller",
"description": "CoreEnroller plugin for CakePHP",
"type": "cakephp-plugin",
"license": "MIT",
"require": {
"php": ">=7.2",
"cakephp/cakephp": "4.4.*"
},
"require-dev": {
"phpunit/phpunit": "^8.5 || ^9.3"
},
"autoload": {
"psr-4": {
"CoreEnroller\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"CoreEnroller\\Test\\": "tests/",
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
}
}
}
30 changes: 30 additions & 0 deletions app/plugins/CoreEnroller/phpunit.xml.dist
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="tests/bootstrap.php"
>
<php>
<ini name="memory_limit" value="-1"/>
<ini name="apc.enable_cli" value="1"/>
</php>

<!-- Add any additional test suites you want to run here -->
<testsuites>
<testsuite name="CoreEnroller">
<directory>tests/TestCase/</directory>
</testsuite>
</testsuites>

<!-- Setup fixture extension -->
<extensions>
<extension class="Cake\TestSuite\Fixture\PHPUnitExtension" />
</extensions>

<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
</phpunit>