Skip to content

Feature cfm31 #209

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9fec427
Initial implementation of Enrollment Flow infrastructure and Attribut…
Feb 27, 2024
a1ea421
Miscellaneous Enrollment fixes (CFM-31)
Feb 28, 2024
e3332e5
Refactor EnrollmentFlow* files:setPermissions
Ioannis Mar 3, 2024
2557d43
Add top-level subnavigation to Enrollment Flow and Enrollment Flow St…
arlen Mar 7, 2024
fe55799
Add main-menu navigation for Petitions and Enrollments (CFM-31)
arlen Mar 8, 2024
b56f338
Add titles to Petition steps and buttons to the steps index (CFM-31) …
arlen Mar 13, 2024
4549f2e
Simplify end-user Petition views (CFM-31) (#175)
arlen Mar 13, 2024
7e469d5
Subnavigation fix for Enrollment Flow steps (CFM-31) (#177)
arlen Mar 27, 2024
e92b586
Post-rebase vs. develop corrections (CFM-31)
arlen Aug 14, 2024
0101b94
Update AttributeCollectors permissions definition (CFM-31)
Sep 22, 2024
c8fc075
fix EnrollmetFlow and EnrollmentFlowSteps fields
Ioannis Sep 23, 2024
42ee120
Fix EnrollmentAttributes fiels
Ioannis Sep 24, 2024
23bac8d
lookupPersonByLogin vs lookupPersonForLogin fix
Ioannis Sep 24, 2024
63c5968
Render Enrollment Attributes edit/add/view in a modal
Ioannis Sep 24, 2024
8788021
remove duplicate field
Ioannis Sep 24, 2024
bae9488
Correct test for $rowActions post-rebase. (CFM-31)
arlen Sep 24, 2024
9a427e2
feature-cfm31-subnavigation (#217)
Ioannis Sep 26, 2024
7be2d7d
Fix EnrollmentFlow broken start view. Fix petitions view.
Ioannis Sep 27, 2024
bb01666
Fix dispatch View to use the new FieldHelper.php
Ioannis Sep 27, 2024
1c97ecb
Fix missing curly brach error
Ioannis Sep 27, 2024
8fcfc71
Improve Form global edit mode handling
Ioannis Sep 27, 2024
7c54415
Fix petition view issue
Ioannis Sep 27, 2024
b97ba33
Add filter block for Enrollment Flows and Petitions
Ioannis Sep 27, 2024
65f370d
Filter Petitions by COU
Ioannis Sep 27, 2024
0e4f691
Make dispatch view editable
Ioannis Sep 27, 2024
2774525
Add petition "start" action to $isActivePetition boolean in default.p…
arlen Sep 27, 2024
651eccc
Add enrollment attribute view should redirect to "self" (CFM-31) (#219)
arlen Sep 27, 2024
1587699
Remove deprecated subnavigation config (CFM-31) (#220)
arlen Sep 27, 2024
20ba5da
fix iframe flash message rendering
Ioannis Sep 27, 2024
27fc36e
Simple fix for h1 title (CFM-31) (#221)
arlen Sep 27, 2024
bfe37bd
Ensure a title exists on Petition start, dispatch, and resume (CFM-31…
arlen Sep 27, 2024
4289852
Remove unnecessary top-link from Enrollment Flow properties (CFM-31) …
arlen Sep 27, 2024
13b9e1c
fix deep nested navigation tab id calculation
Ioannis Sep 28, 2024
6ab65c2
Add TabHelper missing dependency
Ioannis Sep 29, 2024
b9f19e9
Refactor Enrollment Attributes Add/Edit view (#224)
Ioannis Sep 30, 2024
b8c14db
Fix wrong url id harvest (#225)
Ioannis Sep 30, 2024
5e8df10
Set petition titles (Enrollment Flow name, Flow Step description) in …
arlen Sep 30, 2024
f064512
fix subnavigation issues (#228)
Ioannis Oct 1, 2024
d206890
Cleanup to subnavigation and titling (CFM-31) (#229)
arlen Oct 2, 2024
80b200f
Initial implementation of BasicAttributeCollector (CFM-415) (#231)
benno Oct 3, 2024
d6cb69b
Subnavigation fixes (#230)
Ioannis Oct 3, 2024
7e73653
Fix field config for select elements in Pipelines and Message Templat…
arlen Oct 10, 2024
f4c5359
fix FieldHelper.php fieldType missing fieldSelectOptions issue
Ioannis Oct 14, 2024
69e710c
Fix tab rendering for EnrollmentFlow plugins (#235)
Ioannis Oct 14, 2024
5c52be2
Conditionally include a 'Cancel' button next to 'Save' (CFM-31) (#236)
arlen Oct 14, 2024
1008163
Fix use case:Plugin.Hierarchy deep nested when no hasMany association.
Ioannis Oct 15, 2024
59e1267
Merge pull request #237 from Ioannis/fix_deep_nested_association_calc…
Ioannis Oct 15, 2024
d592cf4
Check for hasMany associations before rendering a tab
Ioannis Oct 16, 2024
23ec40a
Merge pull request #238 from Ioannis/Fix_missing_associations_tablist
Ioannis Oct 16, 2024
e24ecc7
Fix misspelled variable
Ioannis Oct 21, 2024
fd0e917
Fix Petition Attributes Form rendering (#241)
Ioannis Oct 23, 2024
039d678
Initial theme commit for Enrollment Flow Attribute Collector (CFM-31)…
arlen Oct 23, 2024
7378151
Update of attribute collector list-element class names for better con…
arlen Oct 23, 2024
77ccfbb
Fix Attribute Collectors dispatch view dependency data
Ioannis Oct 24, 2024
4ca3036
Select attribute fields by css class name (CFM-31) (#245)
arlen Oct 24, 2024
444fede
Initial commit of Mostly Static Pages (CFM-62), InvitationAccepter (C…
Oct 31, 2024
68db3dd
Initial implementation of Identifier Collector Enroller (CFM-111)
Nov 3, 2024
641d73d
Update attribute collector CSS selectors to reflect updated DOM class…
arlen Nov 6, 2024
7d8135a
First pass at cleaning up Petition view (CFM-31) (#246)
arlen Nov 8, 2024
6a90028
Add support for attribute collection fieldsets (#244)
Ioannis Nov 13, 2024
701b8d1
Switch to Material Symbols (CFM-404) (#248)
arlen Nov 13, 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

This file was deleted.

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
113 changes: 111 additions & 2 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,18 @@
"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 },
"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 @@ -517,8 +522,8 @@
"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 +599,110 @@
}
},

"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" ] }
}
},

"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>