Skip to content

Commit

Permalink
fix: only op-tc are affected by the submit app/var block op-adm check (
Browse files Browse the repository at this point in the history
…#447)

* fix: only op-tc are affected by the submit app/var block op-adm check

* chore: cleanup imports
  • Loading branch information
jerotire authored Nov 12, 2024
1 parent a750a4e commit 4ce6321
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Dvsa\Olcs\Transfer\Command\GovUkAccount\GetGovUkAccountRedirect;
use Dvsa\Olcs\Transfer\Query\FeatureToggle\IsEnabled as IsEnabledQry;
use Dvsa\Olcs\Transfer\Query\User\OperatorAdminForOrganisationHasLoggedIn;
use Dvsa\Olcs\Transfer\Query\User\UserListSelfserve;
use Dvsa\Olcs\Transfer\Util\Annotation\AnnotationBuilder;
use Dvsa\Olcs\Utils\Translation\NiTextTranslation;
use Exception;
Expand Down Expand Up @@ -348,12 +347,9 @@ private function operatorAdminForOrganisationHasLoggedIn($organisationId): bool
*/
protected function checkIfOperatorAdminHasLoggedIn($organisationId, $form = null): bool
{
/**
* @todo we need this check to always return true for now
* @see https://dvsa.atlassian.net/browse/VOL-5886
* @see https://dvsa.atlassian.net/browse/VOL-5885
*/
return true;
if (!$this->authService->isGranted(RefData::ROLE_OPERATOR_TC)) {
return true;
}

$operatorAdminHasLoggedIn = $this->operatorAdminForOrganisationHasLoggedIn($organisationId);

Expand Down

0 comments on commit 4ce6321

Please sign in to comment.