Skip to content

feature-cfm31_2 #210

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
93 changes: 91 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 @@ -27,11 +29,13 @@
"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 +521,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 +598,91 @@
}
},

"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 }
},
"indexes": {
"enrollment_flow_steps_i1": { "columns": [ "enrollment_flow_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>
111 changes: 111 additions & 0 deletions app/plugins/CoreEnroller/resources/locales/en_US/core_enroller.po
@@ -0,0 +1,111 @@
# COmanage Registry Localizations (core_enroller domain)
#
# Portions licensed to the University Corporation for Advanced Internet
# Development, Inc. ("UCAID") under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# UCAID licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# @link https://www.internet2.edu/comanage COmanage Project
# @package registry-plugins
# @since COmanage Registry v5.0.0
# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

msgid "controller.AttributeCollectors"
msgstr "{0,plural,=1{Attribute Collector} other{Attribute Collectors}}"

msgid "controller.EnrollmentAttributes"
msgstr "{0,plural,=1{Enrollment Attribute} other{Enrollment Attributes}}"

# These are pseudo-enumerations, only used for fields.inc
msgid "enumeration.DefaultValueValidityType.after"
msgstr "Days After Finalization"

msgid "enumeration.DefaultValueValidityType.on"
msgstr "On This Date"

msgid "field.EnrollmentAttributes.address_required_fields"
msgstr "Required Address Fields"

msgid "field.EnrollmentAttributes.address_required_fields.desc"
msgstr "Must be at least as restrictive as the CO Setting configuration, or blank to follow the CO Setting"

msgid "field.EnrollmentAttributes.address_type_id"
msgstr "Address Type"

msgid "field.EnrollmentAttributes.attribute_language"
msgstr "Attribute Language"

msgid "field.EnrollmentAttributes.attribute_mvea_parent"
msgstr "Attribute Attaches To"

msgid "field.EnrollmentAttributes.attribute_tag"
msgstr "Ad Hoc Attribute Tag"

msgid "field.EnrollmentAttributes.default_value"
msgstr "Default Value"

msgid "field.EnrollmentAttributes.default_value_affiliation_type_id"
msgstr "Default Value"

msgid "field.EnrollmentAttributes.default_value_cou_id"
msgstr "Default Value"

msgid "field.EnrollmentAttributes.default_value_datetime"
msgstr "Default Value"

msgid "field.EnrollmentAttributes.default_value_env_name"
msgstr "Environmental Variable for Default Value"

msgid "field.EnrollmentAttributes.default_value_group_id"
msgstr "Default Value"

msgid "field.EnrollmentAttributes.default_value_validity_type"
msgstr "Default Validity Date Type"

msgid "field.EnrollmentAttributes.email_address_type_id"
msgstr "Email Address Type"

msgid "field.EnrollmentAttributes.identifier_type_id"
msgstr "Identifier Type"

msgid "field.EnrollmentAttributes.label"
msgstr "Display Label"

msgid "field.EnrollmentAttributes.name_required_fields"
msgstr "Required Name Fields"

msgid "field.EnrollmentAttributes.name_required_fields.desc"
msgstr "Must be at least as restrictive as the CO Setting configuration, or blank to follow the CO Setting"

msgid "field.EnrollmentAttributes.name_type_id"
msgstr "Name Type"

msgid "field.EnrollmentAttributes.petition_text"
msgstr "Text Field (Petition Use Only)"

msgid "field.EnrollmentAttributes.petition_textarea"
msgstr "Text Area (Petition Use Only)"

msgid "field.EnrollmentAttributes.pronoun_type_id"
msgstr "Pronouns Type"

msgid "field.EnrollmentAttributes.telephone_number_type_id"
msgstr "Telephone Number Type"

msgid "field.EnrollmentAttributes.url_type_id"
msgstr "URL Type"

msgid "result.attr.saved"
msgstr "Petition Attributes recorded"
10 changes: 10 additions & 0 deletions app/plugins/CoreEnroller/src/Controller/AppController.php
@@ -0,0 +1,10 @@
<?php
declare(strict_types=1);

namespace CoreEnroller\Controller;

use App\Controller\AppController as BaseController;

class AppController extends BaseController
{
}