diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-22 17:05:33 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-06-26 09:18:49 +0200 |
commit | d3d357fb9466c05f45a214b320907a203b5bdd92 (patch) | |
tree | 187a61cf96efcf1b36f235551e94f37a28fba75c /settings/src/components | |
parent | dfbc21d8062c2ae7f58c91a4eb1d29b320819ab5 (diff) | |
download | nextcloud-server-d3d357fb9466c05f45a214b320907a203b5bdd92.tar.gz nextcloud-server-d3d357fb9466c05f45a214b320907a203b5bdd92.zip |
Resend activation email for new users as admin
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'settings/src/components')
-rw-r--r-- | settings/src/components/userList/userRow.vue | 37 |
1 files changed, 34 insertions, 3 deletions
diff --git a/settings/src/components/userList/userRow.vue b/settings/src/components/userList/userRow.vue index 990c63b8a48..6f8972de63c 100644 --- a/settings/src/components/userList/userRow.vue +++ b/settings/src/components/userList/userRow.vue @@ -114,6 +114,10 @@ <popover-menu :menu="userActions" /> </div> </div> + <div class="feedback" :style="{opacity: feedbackMessage !== '' ? 1 : 0}"> + <div class="icon-checkmark"></div> + {{feedbackMessage}} + </div> </div> </div> </template> @@ -146,6 +150,7 @@ export default { return { rand: parseInt(Math.random() * 1000), openedMenu: false, + feedbackMessage: '', loading: { all: false, displayName: false, @@ -163,7 +168,7 @@ export default { computed: { /* USER POPOVERMENU ACTIONS */ userActions() { - return [{ + let actions = [{ icon: 'icon-delete', text: t('settings','Delete user'), action: this.deleteUser @@ -171,7 +176,15 @@ export default { icon: this.user.enabled ? 'icon-close' : 'icon-add', text: this.user.enabled ? t('settings','Disable user') : t('settings','Enable user'), action: this.enableDisableUser - }] + }]; + if (this.user.email !== null && this.user.email !== '') { + actions.push({ + icon: 'icon-mail', + text: t('settings','Resend welcome email'), + action: this.sendWelcomeMail + }) + } + return actions; }, /* GROUPS MANAGEMENT */ @@ -289,7 +302,7 @@ export default { this.loading.delete = true; this.loading.all = true; let userid = this.user.id; - return this.$store.dispatch('deleteUser', {userid}) + return this.$store.dispatch('deleteUser', userid) .then(() => { this.loading.delete = false this.loading.all = false @@ -506,6 +519,24 @@ export default { value: lang.code }).then(() => this.loading.languages = false); return lang; + }, + + /** + * Dispatch new welcome mail request + */ + sendWelcomeMail() { + this.loading.all = true; + this.$store.dispatch('sendWelcomeMail', this.user.id) + .then(success => { + if (success) { + // Show feedback to indicate the success + this.feedbackMessage = t('setting', 'Welcome mail sent!'); + setTimeout(() => { + this.feedbackMessage = ''; + }, 2000); + } + this.loading.all = false; + }); } } } |