-
Notifications
You must be signed in to change notification settings - Fork 4
CFM-121_ORCID_Source_Plugin #311
Merged
+2,969
−33
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| /composer.lock | ||
| /composer.phar | ||
| /phpunit.xml | ||
| /.phpunit.result.cache | ||
| /phpunit.phar | ||
| /config/Migrations/schema-dump-default.lock | ||
| /vendor/ | ||
| /.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # OrcidSource plugin for CakePHP | ||
|
|
||
| ## Installation | ||
|
|
||
| You can install this plugin into your CakePHP application using [composer](https://getcomposer.org). | ||
|
|
||
| The recommended way to install composer packages is: | ||
|
|
||
| ``` | ||
| composer require your-name-here/orcid-source | ||
| ``` |
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, do we need to commit this file? The name is wrong, the license is wrong, and the autoload paths should have been addressed by the main composer.json mods above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @benno the same as above |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| { | ||
| "name": "your-name-here/orcid-source", | ||
| "description": "OrcidSource plugin for CakePHP", | ||
| "type": "cakephp-plugin", | ||
| "license": "MIT", | ||
| "require": { | ||
| "php": ">=7.2", | ||
| "cakephp/cakephp": "4.6.*" | ||
| }, | ||
| "require-dev": { | ||
| "phpunit/phpunit": "^8.5 || ^9.3" | ||
| }, | ||
| "autoload": { | ||
| "psr-4": { | ||
| "OrcidSource\\": "src/" | ||
| } | ||
| }, | ||
| "autoload-dev": { | ||
| "psr-4": { | ||
| "OrcidSource\\Test\\": "tests/", | ||
| "Cake\\Test\\": "vendor/cakephp/cakephp/tests/" | ||
| } | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| <?php | ||
| /** | ||
| * Orcid Source plugin specific routes. | ||
| * | ||
| * 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.2.0 | ||
| * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
| */ | ||
|
|
||
| use Cake\Routing\Route\DashedRoute; | ||
|
|
||
| $routes->plugin( | ||
| 'OrcidSource', | ||
| ['path' => '/orcid-source/'], | ||
| function ($routes) { | ||
| $routes->setRouteClass(DashedRoute::class); | ||
|
|
||
| $routes->get( | ||
| 'orcid-sources/callback', | ||
| [ | ||
| 'plugin' => 'OrcidSource', | ||
| 'controller' => 'OrcidSources', | ||
| 'action' => 'callback', | ||
| ]); | ||
| } | ||
| ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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="OrcidSource"> | ||
| <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> |
110 changes: 110 additions & 0 deletions
110
app/plugins/OrcidSource/resources/locales/en_US/orcid_source.po
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| # COmanage Registry Localizations (orcid_source 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 | ||
| # @since COmanage Registry v5.2.0 | ||
| # @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
|
|
||
| msgid "controller.OrcidSourceCollectors" | ||
| msgstr "{0,plural,=1{Orcid Source Collector} other{Orcid Source Collectors}}" | ||
|
|
||
| msgid "controller.OrcidSources" | ||
| msgstr "{0,plural,=1{Orcid Source} other{Orcid Sources}}" | ||
|
|
||
| msgid "controller.PetitionOrcidIdentities" | ||
| msgstr "{0,plural,=1{Petition Orcid Identity} other{Petition Orcid Identities}}" | ||
|
|
||
| msgid "enumeration.OrcidSourceTierEnum.PRO" | ||
| msgstr "Production" | ||
|
|
||
| msgid "enumeration.OrcidSourceTierEnum.SBX" | ||
| msgstr "Sandbox" | ||
|
|
||
| msgid "enumeration.OrcidSourceApiEnum.AUT" | ||
| msgstr "Authorize" | ||
|
|
||
| msgid "enumeration.OrcidSourceApiEnum.MEM" | ||
| msgstr "Members" | ||
|
|
||
| msgid "enumeration.OrcidSourceApiEnum.PUB" | ||
| msgstr "Public" | ||
|
|
||
| msgid "error.search" | ||
| msgstr "Search request returned {0}" | ||
|
|
||
| msgid "error.token.none" | ||
| msgstr "Access token not configured (try resaving configuration)" | ||
|
|
||
| msgid "error.param.notfound" | ||
| msgstr "{0} was not found" | ||
|
|
||
| msgid "error.orcid_source.no_orcid" | ||
Ioannis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| msgstr "ORCID identifier missing from response." | ||
|
|
||
| msgid "field.OrcidSources.api_type" | ||
| msgstr "API Type" | ||
|
|
||
| msgid "field.OrcidSources.redirect_uri" | ||
| msgstr "Additional ORCID Redirect URI" | ||
|
|
||
| msgid "field.OrcidSources.scope_inherit" | ||
| msgstr "Inherit Scope" | ||
|
|
||
| msgid "field.OrcidSources.api_tier" | ||
| msgstr "API Tier" | ||
|
|
||
| msgid "field.OrcidSources.name_type_id" | ||
| msgstr "Name Type" | ||
|
|
||
| msgid "field.OrcidSources.telephone_number_type_id" | ||
| msgstr "Telephone Number Type" | ||
|
|
||
| msgid "field.OrcidSources.address_type_id" | ||
| msgstr "Address Type" | ||
|
|
||
| msgid "field.OrcidSources.default_affiliation_type_id" | ||
| msgstr "Default Affiliation Type" | ||
|
|
||
| msgid "field.OrcidSources.email_address_type_id" | ||
| msgstr "Email Address Type" | ||
|
|
||
| msgid "information.OrcidSources.linked" | ||
| msgstr "Obtained ORCID {0} via authenticated OAuth flow" | ||
|
|
||
| msgid "information.orcid_source.identifier" | ||
| msgstr "ORCID Identifier" | ||
|
|
||
| msgid "information.OrcidSourceCollectors.authenticate" | ||
| msgstr "Authenticate with ORCID" | ||
|
|
||
| msgid "information.OrcidSourceCollectors.sign_in" | ||
| msgstr "Sign in with your ORCID account to securely verify your ORCID iD." | ||
|
|
||
| msgid "information.OrcidSources.default.types" | ||
| msgstr "Select Default Types for ORCID Fields" | ||
|
|
||
| msgid "result.OrcidSourceCollector.collected" | ||
| msgstr "Obtained ORCID Identifier {0}" | ||
|
|
||
| msgid "result.orcid.saved" | ||
| msgstr "ORCID Token recorded" | ||
|
|
||
| msgid "result.pipeline.status" | ||
| msgstr "Pipeline completed with status {0}" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <?php | ||
| declare(strict_types=1); | ||
|
|
||
| namespace OrcidSource\Controller; | ||
|
|
||
| use App\Controller\AppController as BaseController; | ||
|
|
||
| class AppController extends BaseController | ||
| { | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we commit this file? It doesn't actually apply...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benno other plugins have this files too. This is why i left it in there. Do we remove them from everywhere?