Skip to content

Commit

Permalink
Merge pull request #182 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 5.1.0
  • Loading branch information
briskt authored May 29, 2019
2 parents 68433e8 + b56ed29 commit 3b70b3c
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 8 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [5.1.0] - 2019-05-29
### Added
- Use `supportName` and `supportEmail` if `helpCenterUrl` is not provided
- Allow multi-line email signature

## [5.0.0] - 2019-05-10
### Added
- Use memcache for session storage
Expand Down Expand Up @@ -96,7 +101,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added
- Initial version of Password Manager Backend.

[Unreleased]: https://github.com/silinternational/idp-pw-api/compare/5.0.0...HEAD
[Unreleased]: https://github.com/silinternational/idp-pw-api/compare/5.1.0...HEAD
[5.1.0]: https://github.com/silinternational/idp-pw-api/compare/5.0.0...5.1.0
[5.0.0]: https://github.com/silinternational/idp-pw-api/compare/4.1.0...5.0.0
[4.1.0]: https://github.com/silinternational/idp-pw-api/compare/4.0.0...4.1.0
[4.0.0]: https://github.com/silinternational/idp-pw-api/compare/3.0.0...4.0.0
Expand Down
4 changes: 3 additions & 1 deletion application/common/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
$uiCorsOrigin = Env::get('UI_CORS_ORIGIN', $uiUrl);
$helpCenterUrl = Env::get('HELP_CENTER_URL');
$codeLength = Env::get('CODE_LENGTH', 6);
$supportPhone = Env::get('SUPPORT_PHONE');
$supportEmail = Env::get('SUPPORT_EMAIL');
$supportName = Env::get('SUPPORT_NAME', 'support');
$supportPhone = Env::get('SUPPORT_PHONE');
$supportUrl = Env::get('SUPPORT_URL');
$supportFeedback = Env::get('SUPPORT_FEEDBACK');
$accessTokenHashKey = Env::get('ACCESS_TOKEN_HASH_KEY');
Expand Down Expand Up @@ -201,6 +202,7 @@
'secretKey' => $recaptchaSecretKey,
],
'support' => [
'name' => $supportName,
'phone' => $supportPhone,
'email' => $supportEmail,
'url' => $supportUrl,
Expand Down
12 changes: 10 additions & 2 deletions application/common/mail/reset/on-behalf.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* @var string $helpCenterUrl
* @var string $emailSignature
* @var string $displayName
* @var string $supportName
* @var string $supportEmail
*/
?>
<p>
Expand All @@ -27,11 +29,17 @@
</p>
<p>
To maintain security, please don't forward this email to anyone.
See our Help Center at <?= yHtml::a(yHtml::encode($helpCenterUrl), $helpCenterUrl) ?> for more security tips.
<?php if (empty($helpCenterUrl)) { ?>
If you have any questions, please contact <?= yHtml::encode($supportName) ?> at
<?= yHtml::encode($supportEmail) ?>.
<?php } else { ?>
See our Help Center at <?= yHtml::a(yHtml::encode($helpCenterUrl), $helpCenterUrl) ?> for more security
tips.
<?php } ?>
</p>
<p>
Thanks,
</p>
<p>
<i><?= yHtml::encode($emailSignature) ?></i>
<i><?= nl2br(yHtml::encode($emailSignature), false) ?></i>
</p>
12 changes: 10 additions & 2 deletions application/common/mail/reset/self.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
* @var string $helpCenterUrl
* @var string $displayName
* @var string $emailSignature
* @var string $supportName
* @var string $supportEmail
*/
?>
<p>
Expand All @@ -27,11 +29,17 @@
</p>
<p>
To keep your account secure, please don't forward this email to anyone.
See our Help Center at <?= yHtml::a(yHtml::encode($helpCenterUrl), $helpCenterUrl) ?> for more security tips.
<?php if (empty($helpCenterUrl)) { ?>
If you have any questions, please contact <?= yHtml::encode($supportName) ?> at
<?= yHtml::encode($supportEmail) ?>.
<?php } else { ?>
See our Help Center at <?= yHtml::a(yHtml::encode($helpCenterUrl), $helpCenterUrl) ?> for more security
tips.
<?php } ?>
</p>
<p>
Thanks,
</p>
<p>
<i><?= yHtml::encode($emailSignature) ?></i>
<i><?= nl2br(yHtml::encode($emailSignature), false) ?></i>
</p>
2 changes: 2 additions & 0 deletions application/common/models/Verification.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public static function sendEmail(
'expireTime' => $expireTime,
'toAddress' => $toAddress,
'helpCenterUrl' => \Yii::$app->params['helpCenterUrl'],
'supportName' => \Yii::$app->params['support']['name'],
'supportEmail' => \Yii::$app->params['support']['email'],
'emailSignature' => \Yii::$app->params['emailSignature'],
],
$additionalEmailParameters
Expand Down
2 changes: 1 addition & 1 deletion application/tests/unit/common/components/IdBrokerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function getMockComponent($mockedMethod = null, $returnValue = null)
->setMethods(['callIdBrokerGetUser', 'listUsers'])
->getMock();

if ($mockedMethod) {
if (is_string($mockedMethod)) {
$brokerMock->expects($this->any())
->method($mockedMethod)
->willReturn($returnValue);
Expand Down
3 changes: 2 additions & 1 deletion local.env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ UI_CORS_ORIGIN=

# === frontend config data ===

# Optional support contact information.
# Optional support contact information. SUPPORT_EMAIL must be provided if HELP_CENTER_URL is not
#SUPPORT_PHONE=
#SUPPORT_EMAIL=
#SUPPORT_NAME=support
#SUPPORT_URL=
#SUPPORT_FEEDBACK=

Expand Down

0 comments on commit 3b70b3c

Please sign in to comment.