Skip to content

Commit

Permalink
pkp#271 Remove the orcidTokens, previously rendered in publishing API
Browse files Browse the repository at this point in the history
  • Loading branch information
withanage committed Jul 30, 2023
1 parent 9e095cf commit 1e35435
Showing 1 changed file with 8 additions and 44 deletions.
52 changes: 8 additions & 44 deletions OrcidProfilePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,78 +137,42 @@ public function register($category, $path, $mainContextId = null)

$schema->properties->orcidSandbox = (object)[
'type' => 'string',
'apiSummary' => true,
'writeOnly' => 'true',
'validation' => ['nullable']
];
$schema->properties->orcidAccessToken = (object)[
'type' => 'string',
'apiSummary' => true,
'writeOnly' => 'true',
'validation' => ['nullable']
];
$schema->properties->orcidAccessScope = (object)[
'type' => 'string',
'apiSummary' => true,
'writeOnly' => 'true',
'validation' => ['nullable']
];
$schema->properties->orcidRefreshToken = (object)[
'type' => 'string',
'apiSummary' => true,
'writeOnly' => 'true',
'validation' => ['nullable']
];
$schema->properties->orcidAccessExpiresOn = (object)[
'type' => 'string',
'apiSummary' => true,
'writeOnly' => 'true',
'validation' => ['nullable']
];
$schema->properties->orcidAccessDenied = (object)[
'type' => 'string',
'apiSummary' => true,
'writeOnly' => 'true',
'validation' => ['nullable']
];
$schema->properties->orcidEmailToken = (object)[
'type' => 'string',
'apiSummary' => true,
'writeOnly' => 'true',
'validation' => ['nullable']
];
$schema->properties->orcidWorkPutCode = (object)[
'type' => 'string',
'apiSummary' => true,
'validation' => ['nullable']
];
});

// Add more ORCiD fields to user Schema
Hook::add('Schema::get::user', function ($hookName, $args) {
$schema = &$args[0];

$schema->properties->orcidAccessToken = (object)[
'type' => 'string',
'apiSummary' => true,
'validation' => ['nullable']
];
$schema->properties->orcidAccessScope = (object)[
'type' => 'string',
'apiSummary' => true,
'validation' => ['nullable']
];
$schema->properties->orcidRefreshToken = (object)[
'type' => 'string',
'apiSummary' => true,
'validation' => ['nullable']
];
$schema->properties->orcidAccessExpiresOn = (object)[
'type' => 'string',
'apiSummary' => true,
'validation' => ['nullable']
];
$schema->properties->orcidAccessDenied = (object)[
'type' => 'string',
'apiSummary' => true,
'validation' => ['nullable']
];
$schema->properties->orcidReviewPutCode = (object)[
'type' => 'string',
'apiSummary' => true,
'writeOnly' => 'true',
'validation' => ['nullable']
];
});
Expand Down

0 comments on commit 1e35435

Please sign in to comment.