Skip to content

Commit

Permalink
Merge branch 'develop' of github.internet2.edu:COmanage/registry into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
Benn Oshrin committed Jun 10, 2023
2 parents 47ef7bb + 3c6f3d2 commit 3955416
Show file tree
Hide file tree
Showing 62 changed files with 4,317 additions and 607 deletions.
109 changes: 66 additions & 43 deletions app/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,49 +351,72 @@
/**
* Configures logging options
*/
'Log' => [
'debug' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'debug',
'url' => env('LOG_DEBUG_URL', null),
'scopes' => false,
'levels' => ['notice', 'info', 'debug'],
],
'error' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'error',
'url' => env('LOG_ERROR_URL', null),
'scopes' => false,
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
],
// To enable this dedicated query log, you need set your datasource's log flag to true
'queries' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'queries',
'url' => env('LOG_QUERIES_URL', null),
'scopes' => ['queriesLog'],
],
// We define a trace level for what is really debugging, except debug level
// will write to stdout instead of the log when debug=true
'trace' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'trace',
'url' => env('LOG_TRACE_URL', null),
'scopes' => ['trace'],
],
// We define a rules level to record application rule execution
'rule' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'rule',
'url' => env('LOG_TRACE_URL', null),
'scopes' => ['rule'],
]
],
'Log' => null !== env('COMANAGE_REGISTRY_CONTAINER', null)
// Configuration for container deployments
? [
'debug' => [
'className' => 'Cake\Log\Engine\ConsoleLog',
'stream' => 'php://stdout',
'outputAs' => 0,
'scopes' => false,
'levels' => ['notice', 'info', 'debug'],
],
'error' => [
'className' => 'Cake\Log\Engine\ConsoleLog',
'stream' => 'php://stderr',
'outputAs' => 0,
'scopes' => false,
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
],
'queries' => [
'className' => 'Cake\Log\Engine\ConsoleLog',
'stream' => 'php://stdout',
'outputAs' => 0,
'scopes' => ['queriesLog']
],
'trace' => [
'className' => 'Cake\Log\Engine\ConsoleLog',
'stream' => 'php://stdout',
'outputAs' => 0,
'scopes' => ['trace'],
]
]
// Configuration for tranditional deployments
: [
'debug' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'debug',
'url' => env('LOG_DEBUG_URL', null),
'scopes' => false,
'levels' => ['notice', 'info', 'debug'],
],
'error' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'error',
'url' => env('LOG_ERROR_URL', null),
'scopes' => false,
'levels' => ['warning', 'error', 'critical', 'alert', 'emergency'],
],
// To enable this dedicated query log, you need set your datasource's log flag to true
'queries' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'queries',
'url' => env('LOG_QUERIES_URL', null),
'scopes' => ['queriesLog'],
],
// We define a trace level for what is really debugging, except debug level
// will write to stdout instead of the log when debug=true
'trace' => [
'className' => 'Cake\Log\Engine\FileLog',
'path' => LOGS,
'file' => 'trace',
'url' => env('LOG_TRACE_URL', null),
'scopes' => ['trace'],
]
],

/**
* Session configuration.
Expand Down
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/field.po
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ msgstr "Limit Global Search Scope"
msgid "CoSettings.search_global_limited_models.desc"
msgstr "If true, Global Search will only search Names, Email Addresses, and Identifiers. This may result in faster searches for larger deployments."

msgid "format"
msgstr "format"

msgid "GroupMembers.source"
msgstr "Membership Source"

Expand Down
6 changes: 6 additions & 0 deletions app/resources/locales/en_US/information.po
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ msgstr "Active, Cannot Be Disabled"
msgid "plugin.inactive"
msgstr "Inactive"

msgid "global.attribute.modal"
msgstr "Attribute Modal"

msgid "global.attributes"
msgstr "Attributes"

msgid "global.records.none"
msgstr "There are no records to display."

Expand Down
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/menu.po
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ msgstr "All Groups"
msgid "co.switch"
msgstr "Switch CO"

msgid "menu.user"
msgstr "User Menu"

msgid "registries"
msgstr "Available {0} Registries"

Expand Down
2 changes: 1 addition & 1 deletion app/src/Command/SetupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public function execute(Arguments $args, ConsoleIo $io)

$person->person_roles = [$coTable->People->PersonRoles->newEntity([
'affiliation_type_id' => $coTable->Types->getTypeId(coId: $co_id,
attribute: 'PersonRoles.affiliation',
attribute: 'PersonRoles.affiliation_type',
value: 'staff'),
'title' => __d('command', 'se.person_role.title'),
'status' => SuspendableStatusEnum::Active
Expand Down
5 changes: 5 additions & 0 deletions app/src/Controller/StandardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ public function beforeRender(\Cake\Event\EventInterface $event) {
}

$this->set('vv_template_path', $vv_template_path);

// Check to see if the model names a specific layout
if(method_exists($table, "getLayout")) {
$this->viewBuilder()->setLayout($table->getLayout());
}

return parent::beforeRender($event);
}
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/AdHocAttributesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@ class AdHocAttributesTable extends Table {
use \App\Lib\Traits\ValidationTrait;
use \App\Lib\Traits\SearchFilterTrait;

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/AddressesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ class AddressesTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/EmailAddressesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@ class EmailAddressesTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
7 changes: 4 additions & 3 deletions app/src/Model/Table/ExternalIdentitiesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,15 @@ public function initialize(array $config): void {
// XXX does some of this stuff really belong in the controller?
$this->setEditContains([
'PrimaryName',
/* 'Addresses',
'Addresses',
'AdHocAttributes',
'EmailAddresses',
'Identifiers',
'Names',
'PersonRoles',
//'ExternalIdentityRoles',
'Pronouns',
'TelephoneNumbers',
'Urls'*/
'Urls'
]);
$this->setIndexContains(['PrimaryName']);

Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/IdentifiersTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,26 @@ class IdentifiersTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/NamesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,26 @@ class NamesTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
3 changes: 2 additions & 1 deletion app/src/Model/Table/PeopleTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ public function initialize(array $config): void {
'EmailAddresses',
'Identifiers',
'Names',
'PersonRoles',
//'PersonRoles',
'Pronouns',
'TelephoneNumbers',
'Urls'
]);
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/PronounsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,26 @@ class PronounsTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
20 changes: 20 additions & 0 deletions app/src/Model/Table/TelephoneNumbersTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,26 @@ class TelephoneNumbersTable extends Table {
]
];

/**
* Provide the default layout
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getLayout(): string {
return "iframe";
}

/**
* Provide the default redirect goal
*
* @since COmanage Registry v5.0.0
* @return string Type of redirect
*/
public function getRedirectGoal(): string {
return "self";
}

/**
* Perform Cake Model initialization.
*
Expand Down
Loading

0 comments on commit 3955416

Please sign in to comment.