Skip to content

Commit

Permalink
Fixes to RegistryAuthComponent (NOJIRA)
Browse files Browse the repository at this point in the history
  • Loading branch information
Benn Oshrin committed Jan 23, 2023
1 parent c315451 commit ccd5913
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/src/Controller/Component/RegistryAuthComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ protected function calculatePermissions(?int $id=null): array {
// $this->name = Models (ie: from ModelsTable)
$modelsName = ($pluginName ? "$pluginName." : "") . $controller->getName();
// $table = the actual table object

$table = $controller->getTableLocator()->get($modelsName);

// Do we have an authenticated user?
$authenticatedUser = (bool)$this->getAuthenticatedUser();
Expand Down Expand Up @@ -600,11 +600,10 @@ public function isCoMember(?int $coId): bool {

$apiUser = $ApiUsers->find()
->where([
'ApiUsers.username' => $this->authenticateApiUser,
'ApiUsers.username' => $this->authenticatedUser,
'ApiUsers.co_id' => $coId,
'ApiUsers.status' => SuspendableStatusEnum::Active
])
->contain()
->first();

if($apiUser) {
Expand Down

0 comments on commit ccd5913

Please sign in to comment.