forked from COmanage/match
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Implement Resolution Notification Callback (CO-1808) and Matchgrid Hi…
…story Records (CO-1682)
Benn Oshrin
committed
Sep 17, 2022
1 parent
771d463
commit 5ee3c58
Showing
30 changed files
with
1,307 additions
and
35 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2019-09/schema", | ||
"$id": "https://github.internet2.edu/COmanage/match/blob/main/app/config/schema/endpoint-notification.json", | ||
"title": "COmanage Match Endpoint Notification Message Format", | ||
"description": "COmanage Match Endpoint Notification Message Format v1", | ||
|
||
"type": "object", | ||
"properties": { | ||
"meta": { | ||
"type": "object", | ||
"properties": { | ||
"source": { | ||
"description": "Source of this notification", | ||
"const": "COmanage Match" | ||
}, | ||
"event": { | ||
"description": "Event described in this notification", | ||
"const": "match-resolution" | ||
}, | ||
"format": { | ||
"description": "Notification message format version", | ||
"const": "1" | ||
} | ||
}, | ||
"required": [ "source", "event", "format" ] | ||
}, | ||
"sor": { | ||
"description": "System of Record Label for notification subject", | ||
"type": "string" | ||
}, | ||
"sorid": { | ||
"description": "System of Record Identifier for notification subject", | ||
"type": "string" | ||
}, | ||
"matchRequest": { | ||
"description": "Match Request ID, as generated on original Match Request", | ||
"type": "string" | ||
}, | ||
"referenceId": { | ||
"description": "Match Reference Identifier", | ||
"type": "string" | ||
}, | ||
"resolutionTime": { | ||
"description": "Time request was resolved by the Identity Match service", | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
}, | ||
"required": [ "sor", "sorid", "matchRequest", "referenceId", "resolutionTime" ] | ||
} |
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,66 @@ | ||
<?php | ||
/** | ||
* COmanage Match Endpoints Controller | ||
* | ||
* 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 match | ||
* @since COmanage Match v1.1.0 | ||
* @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) | ||
*/ | ||
|
||
declare(strict_types = 1); | ||
|
||
namespace App\Controller; | ||
|
||
class EndpointsController extends StandardController { | ||
public $pagination = [ | ||
'order' => [ | ||
'Endpoints.serverurl' => 'asc' | ||
] | ||
]; | ||
|
||
/** | ||
* Authorization for this Controller, called by Auth component | ||
* - postcondition: $vv_permissions set with calculated permissions for this Controller | ||
* | ||
* @since COmanage Match v1.1.0 | ||
* @param Array $user Array of user data | ||
* @return Boolean True if authorized for the current action, false otherwise | ||
*/ | ||
|
||
public function isAuthorized(Array $user) { | ||
$mgid = isset($this->cur_mg->id) ? $this->cur_mg->id : null; | ||
|
||
$platformAdmin = $this->Authorization->isPlatformAdmin($user['username']); | ||
|
||
$mgAdmin = $this->Authorization->isMatchAdmin($user['username'], $mgid); | ||
|
||
$p = [ | ||
'add' => $platformAdmin || $mgAdmin, | ||
'delete' => $platformAdmin || $mgAdmin, | ||
'edit' => $platformAdmin || $mgAdmin, | ||
'index' => $platformAdmin || $mgAdmin, | ||
'view' => false | ||
]; | ||
|
||
$this->set('vv_permissions', $p); | ||
return $p[$this->request->getParam('action')]; | ||
} | ||
} |
Oops, something went wrong.