|
@@ -40,7 +40,7 @@ discard block |
|
|
block discarded – undo |
|
40
|
40
|
public function applyNewInstitutionConfigurationCreatedEvent(NewInstitutionConfigurationCreatedEvent $event): void |
|
41
|
41
|
{ |
|
42
|
42
|
$institutionConfiguration = new InstitutionConfiguration( |
|
43
|
|
- (string)$event->institution, |
|
|
43
|
+ (string) $event->institution, |
|
44
|
44
|
$event->ssoOn2faOption->isEnabled(), |
|
45
|
45
|
$event->ssoRegistrationBypassOption->isEnabled(), |
|
46
|
46
|
); |
|
@@ -50,7 +50,7 @@ discard block |
|
|
block discarded – undo |
|
50
|
50
|
|
|
51
|
51
|
public function applySsoOn2faOptionChangedEvent(SsoOn2faOptionChangedEvent $event): void |
|
52
|
52
|
{ |
|
53
|
|
- $institutionConfiguration = $this->repository->findByInstitution((string)$event->institution); |
|
|
53
|
+ $institutionConfiguration = $this->repository->findByInstitution((string) $event->institution); |
|
54
|
54
|
if ($institutionConfiguration instanceof InstitutionConfiguration) { |
|
55
|
55
|
$institutionConfiguration->ssoOn2faEnabled = $event->ssoOn2faOption->isEnabled(); |
|
56
|
56
|
$this->repository->save($institutionConfiguration); |
|
@@ -59,7 +59,7 @@ discard block |
|
|
block discarded – undo |
|
59
|
59
|
// It can happen that the event changed for an institution that already exists, but is not yet projected to |
|
60
|
60
|
// this projection. In that case we can create it. |
|
61
|
61
|
$institutionConfiguration = new InstitutionConfiguration( |
|
62
|
|
- (string)$event->institution, |
|
|
62
|
+ (string) $event->institution, |
|
63
|
63
|
$event->ssoOn2faOption->isEnabled(), |
|
64
|
64
|
SsoRegistrationBypassOption::getDefault()->isEnabled(), |
|
65
|
65
|
); |
|
@@ -68,7 +68,7 @@ discard block |
|
|
block discarded – undo |
|
68
|
68
|
|
|
69
|
69
|
public function applySsoRegistrationBypassOptionChangedEvent(SsoRegistrationBypassOptionChangedEvent $event): void |
|
70
|
70
|
{ |
|
71
|
|
- $institutionConfiguration = $this->repository->findByInstitution((string)$event->institution); |
|
|
71
|
+ $institutionConfiguration = $this->repository->findByInstitution((string) $event->institution); |
|
72
|
72
|
if ($institutionConfiguration instanceof InstitutionConfiguration) { |
|
73
|
73
|
$institutionConfiguration->ssoRegistrationBypass = $event->ssoRegistrationBypassOption->isEnabled(); |
|
74
|
74
|
$this->repository->save($institutionConfiguration); |
|
@@ -77,7 +77,7 @@ discard block |
|
|
block discarded – undo |
|
77
|
77
|
// It can happen that the event changed for an institution that already exists, but is not yet projected to |
|
78
|
78
|
// this projection. In that case we can create it. |
|
79
|
79
|
$institutionConfiguration = new InstitutionConfiguration( |
|
80
|
|
- (string)$event->institution, |
|
|
80
|
+ (string) $event->institution, |
|
81
|
81
|
SsoOn2faOption::getDefault()->isEnabled(), |
|
82
|
82
|
$event->ssoRegistrationBypassOption->isEnabled(), |
|
83
|
83
|
); |
|
@@ -86,7 +86,7 @@ discard block |
|
|
block discarded – undo |
|
86
|
86
|
|
|
87
|
87
|
public function applyInstitutionConfigurationRemovedEvent(InstitutionConfigurationRemovedEvent $event): void |
|
88
|
88
|
{ |
|
89
|
|
- $this->repository->removeFor((string)$event->institution); |
|
|
89
|
+ $this->repository->removeFor((string) $event->institution); |
|
90
|
90
|
} |
|
91
|
91
|
|
|
92
|
92
|
protected function applyIdentityForgottenEvent(IdentityForgottenEvent $event): void |