Skip to content

Commit

Permalink
feat: VOL-5664 selfserve accounts require t&c signup on first login (#97
Browse files Browse the repository at this point in the history
)

* feat: VOL-5664 selfserve accounts require t&c signup on first login

* Update src/Command/User/AgreeTerms.php

Co-authored-by: Andrew Newton <[email protected]>

* correct discrepancy between post/put

* add distinction for users created by a consultant

---------

Co-authored-by: Andrew Newton <[email protected]>
  • Loading branch information
ilindsay and fibble authored Nov 15, 2024
1 parent 3256ac5 commit f64e916
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/backend-routes/user/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
'POST' => CommandConfig::getPostConfig(Command\User\RemindUsernameSelfserve::class),
]
),
'agree-terms' => RouteConfig::getRouteConfig(
'agree-terms',
[
'POST' => CommandConfig::getPostConfig(Command\User\AgreeTerms::class),
]
),
'single' => RouteConfig::getSingleConfig(
[
'GET' => QueryConfig::getConfig(Query\User\UserSelfserve::class),
Expand Down
16 changes: 16 additions & 0 deletions src/Command/User/AgreeTerms.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace Dvsa\Olcs\Transfer\Command\User;

use Dvsa\Olcs\Transfer\Util\Annotation as Transfer;
use Dvsa\Olcs\Transfer\Command\AbstractCommand;

/**
* @Transfer\RouteName("backend/user/selfserve/agree-terms")
* @Transfer\Method("POST")
*/
final class AgreeTerms extends AbstractCommand
{
}
11 changes: 11 additions & 0 deletions src/Command/User/RegisterUserSelfserve.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ final class RegisterUserSelfserve extends AbstractCommand
*/
protected $businessType;

/**
* @Transfer\Filter("Laminas\Filter\Boolean")
* @Transfer\Optional
*/
protected $createdByConsultant = false;

public function getLoginId()
{
return $this->loginId;
Expand All @@ -76,4 +82,9 @@ public function getBusinessType()
{
return $this->businessType;
}

public function getCreatedByConsultant()
{
return $this->createdByConsultant;
}
}

0 comments on commit f64e916

Please sign in to comment.