diff options
author | Peter Zhang <peter@innocraft.com> | 2022-06-07 02:47:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-07 02:47:10 +0300 |
commit | d036954668dcd4cf8cb4a5235cbed7519503d0f6 (patch) | |
tree | 7abe98a4dba386675aa60daf66dcc3331c1230fd /plugins/CoreAdminHome | |
parent | 3afdfcaa029d93ea3a5db53b0966e8d41f0e7749 (diff) |
invite user replace add user (#18868)
* draft vue version
draft vue version
* built vue files
* update some functions
update some functions
* Update API.php
update wording
* move some validation
move some validation
* built vue files
* update some structure
update some structure
* update validators
update validators
* update some changes
update some changes
* update invite
update invite
* add status
add status
* built vue files
* add invite page
add invite page
* add invite page
add invite page
* add some api back
add some api back
* Update UserRepository.php
update tests
* update all xml in the tests
update all xml in the tests
* update tests
update tests
* update tests
update tests
* Update LoginLdap
update tests
* Update UsersManagerTest.php
update tests
* update tests
update tests
* Update APITest.php
update tests
* Update UserInviteEmail.php
fix cs
* update cs
update cs
* Update SessionAuthTest.php
update tests
* update tests error
update tests error
* Update UserRepository.php
remove unused
* update tests
update tests
* update user tests
update user tests
* update tests
update tests
* Update API.php
update tests
* built vue files
* Update OmniFixture-dump.sql
update tests
* update validator
update validator
* built vue files
* update tests and screenshots
update tests and screenshots
* update test xml
update test xml
* update user total size
update user total size
* update tests
update tests
* built vue files
* update tests and test user email
update tests and test user email
* update tests
update tests
* built vue files
* update tests
update tests
* update ranking in screenshots
update ranking in screenshots
* update test
update test
* update tests
change the table list order
* Update UsersManager_spec.js
update tests
* update tests
update tests
* built vue files
* update tests
update tests
* update tests
update tests
* update tests
update tests
* adding login tests
adding login tests
* update tests
update tests
* Update UsersManager_resend_popup.png
add screenshots
* Update PendingUsers.php
update error of model
* update tests
update tests
* Update UserInviteTest.php
update tests error
* update set up for pending user
should be pending user
* update screenshots
update screenshots
* update wrong password check
update wrong password check
* Update Invite_wrong_password.png
update password
* update to 4.10
update to 4.10
* Update ReportParameters.vue
remove un used element
* update vue file
update vue file
* hide password on invite user
hide password on invite user
* built vue files
* built vue files
* Update UserEditForm.vue
update password condition
* built vue files
* update condition on pending user
update condition on pending user
* built vue files
* update screenshots
update screenshots
* update bugs
update bugs
* built vue files
* add expired status
add expired status
* fix php cs
fix php cs
* update vue error
update vue error
* built vue files
* add decline interface
add decline interface
* update all the user status
update all the user status
* built vue files
* update tests xml for invite status
update tests
* fix phpcs
fix phpcs
* update migration number
update migration number
* update tests email
update tests email
* update screenshot tests
update screenshot tests
* update tests
update tests
* update screenshots
* update screenshots
update screenshots
* Update Invite_wrong_password.png
update screenshots
* update status
update status
* update tests
update tests
* update tests
update tests
* Update TwoFactorAuthUsersManager_spec.js
update tests
* Update TwoFactorAuthUsersManager_spec.js
update tests
* update tests
update tests
* update lang
update lang
* update some errors
update some errors
* update screenshots
update screenshots
* update ui tests and resend invitation
update ui tests and resend invitation
* fix resend
fix resend
* built vue files
* update screenshots
update screenshots
Co-authored-by: peterhashair <peterhashair@users.noreply.github.com>
Diffstat (limited to 'plugins/CoreAdminHome')
-rw-r--r-- | plugins/CoreAdminHome/CoreAdminHome.php | 4 | ||||
-rw-r--r-- | plugins/CoreAdminHome/Emails/UserAcceptInvitationEmail.php | 33 | ||||
-rw-r--r-- | plugins/CoreAdminHome/Emails/UserDeclinedInvitationEmail.php | 33 | ||||
-rw-r--r-- | plugins/CoreAdminHome/lang/en.json | 10 |
4 files changed, 77 insertions, 3 deletions
diff --git a/plugins/CoreAdminHome/CoreAdminHome.php b/plugins/CoreAdminHome/CoreAdminHome.php index 4b312ba876..a80ca1f6a9 100644 --- a/plugins/CoreAdminHome/CoreAdminHome.php +++ b/plugins/CoreAdminHome/CoreAdminHome.php @@ -206,7 +206,7 @@ class CoreAdminHome extends \Piwik\Plugin $translationKeys[] = 'CoreAdminHome_JSTracking_MergeSubdomainsDesc'; $translationKeys[] = 'CoreAdminHome_JSTracking_CustomCampaignQueryParamDesc'; $translationKeys[] = 'CoreAdminHome_SinglePageApplicationDescription'; - - + $translationKeys[] = 'CoreAdminHome_SecurityNotificationUserAcceptInviteBody'; + $translationKeys[] = 'CoreAdminHome_SecurityNotificationUserDeclinedInviteBody'; } } diff --git a/plugins/CoreAdminHome/Emails/UserAcceptInvitationEmail.php b/plugins/CoreAdminHome/Emails/UserAcceptInvitationEmail.php new file mode 100644 index 0000000000..a7c8f58f7b --- /dev/null +++ b/plugins/CoreAdminHome/Emails/UserAcceptInvitationEmail.php @@ -0,0 +1,33 @@ +<?php +/** + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ + +namespace Piwik\Plugins\CoreAdminHome\Emails; + +use Piwik\Piwik; +use Piwik\Plugins\CoreAdminHome\Emails\SecurityNotificationEmail; + +class UserAcceptInvitationEmail extends SecurityNotificationEmail +{ + /** + * @var string + */ + private $userLogin; + + public function __construct($login, $emailAddress, $userLogin) + { + $this->userLogin = $userLogin; + + parent::__construct($login, $emailAddress); + } + + protected function getBody() + { + return Piwik::translate('CoreAdminHome_SecurityNotificationUserAcceptInviteBody', [$this->userLogin]); + } +} diff --git a/plugins/CoreAdminHome/Emails/UserDeclinedInvitationEmail.php b/plugins/CoreAdminHome/Emails/UserDeclinedInvitationEmail.php new file mode 100644 index 0000000000..241cf7827e --- /dev/null +++ b/plugins/CoreAdminHome/Emails/UserDeclinedInvitationEmail.php @@ -0,0 +1,33 @@ +<?php +/** + * Matomo - free/libre analytics platform + * + * @link https://matomo.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ + +namespace Piwik\Plugins\CoreAdminHome\Emails; + +use Piwik\Piwik; +use Piwik\Plugins\CoreAdminHome\Emails\SecurityNotificationEmail; + +class UserDeclinedInvitationEmail extends SecurityNotificationEmail +{ + /** + * @var string + */ + private $userLogin; + + public function __construct($login, $emailAddress, $userLogin) + { + $this->userLogin = $userLogin; + + parent::__construct($login, $emailAddress); + } + + protected function getBody() + { + return Piwik::translate('CoreAdminHome_SecurityNotificationUserDeclinedInviteBody', [$this->userLogin]) ; + } +} diff --git a/plugins/CoreAdminHome/lang/en.json b/plugins/CoreAdminHome/lang/en.json index f5c03a78f6..4103987beb 100644 --- a/plugins/CoreAdminHome/lang/en.json +++ b/plugins/CoreAdminHome/lang/en.json @@ -162,6 +162,14 @@ "YouMayOptOut": "You may choose not to have a unique web analytics cookie identification number assigned to your computer to avoid the aggregation and analysis of data collected on this website.", "YouMayOptOut2": "You may choose to prevent this website from aggregating and analyzing the actions you take here.", "YouMayOptOut3": "Doing so will protect your privacy, but will also prevent the owner from learning from your actions and creating a better experience for you and other users.", - "YouMayOptOutBis": "To make that choice, please click below to receive an opt-out cookie." + "YouMayOptOutBis": "To make that choice, please click below to receive an opt-out cookie.", + "UserInviteSubject": "%1$s sent you an invite to join Matomo Analytics for %2$s.", + "AcceptInvite": "Accept Invite", + "DeclineInvite": "Decline Invite", + "UserInviteContent": "You can accept this invitation by clicking the accept button below.", + "UserInviteNotes": "This invitation was intended for %1$s access. If you were not expecting this invitation, you can ignore this email. If %2$s is sending you too many emails, you can block them or report abuse. The invitation automatically expires in 7 days.", + "SecurityNotificationUserAcceptInviteBody": "User (login: %s) accepted the invitation.", + "SecurityNotificationUserDeclinedInviteBody": "User (login: %s) declined the invitation." + } } |