Skip to content

Commit

Permalink
Additional commit for CFM-169
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed May 20, 2024
1 parent e57a7fc commit ccfbae7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions app/src/Controller/Component/RegistryAuthComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,10 @@ protected function calculatePermissions(?int $id=null): array {
$query = $query->contain($table->$getActionMethod());
}

try {
// Pull the current record
$obj = $query->firstOrFail();
}
catch(\Exception $e) {
// findById throws Cake\Datasource\Exception\RecordNotFoundException
$this->Flash->error($e->getMessage());
return $this->generateRedirect(null);
}
// Pull the current record
// This may throw Cake\Datasource\Exception\RecordNotFoundException,
// which we let bubble up
$obj = $query->firstOrFail();

if(method_exists($obj, "isReadOnly")) {
$readOnly = $obj->isReadOnly();
Expand Down
2 changes: 1 addition & 1 deletion app/src/Model/Table/JobHistoryRecordsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function initialize(array $config): void {

$this->setViewContains([
'People' => ['PrimaryName'],
'ExternalIdentities' => ['PrimaryName']
'ExternalIdentities' => ['Names']
]);

$this->setPermissions([
Expand Down

0 comments on commit ccfbae7

Please sign in to comment.