Skip to content

Add action to resend the invitation email for a user#38774

Merged
AlexAndBear merged 2 commits into
masterfrom
resend-invitation-email
May 26, 2021
Merged

Add action to resend the invitation email for a user#38774
AlexAndBear merged 2 commits into
masterfrom
resend-invitation-email

Conversation

@JammingBen

@JammingBen JammingBen commented May 25, 2021

Copy link
Copy Markdown
Contributor

Description

Resend invitation email
Implemented an action to resend the invitation email for a user that hasnever been logged in yet.

Related Issue

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised: @mmattel required ?
  • Changelog item, see TEMPLATE

@AlexAndBear

Copy link
Copy Markdown

@phil-davis @JammingBen acceptance tests needed ?

@phil-davis

Copy link
Copy Markdown
Contributor

@phil-davis @JammingBen acceptance tests needed ?

We have existing test scenarios like: https://github.com/owncloud/enterprise/issues/4454

  Scenario Outline: user sets his own password after being created with an Email address only
    When the administrator creates a user with the name "<username>" and the email "guiusr1@owncloud" without a password using the webUI
    And the administrator logs out of the webUI
    And the user follows the password set link received by "guiusr1@owncloud" using the webUI
    And the user sets the password to "%regular%" and confirms with the same password using the webUI
    Then the user should be redirected to the login page
    And the email address "guiusr1@owncloud" should have received an email with the body containing
      """
      Password changed successfully
      """
    When the user logs in with username "<username>" and password "%regular%" using the webUI
    Then the user should be redirected to a webUI page with the title "Files - %productname%"
    Examples:
      | username | comment               |
      | guiusr1  | simple user-name      |
      | a@-+_.'b | complicated user-name |

We could add a scenario where the user "forgets" and the email needs to be sent again.

It will need some additions to the page object for the users page, so that the test can find where to click to re-send the email. Who should do that? (I can get someone to look at it tomorrow, if you like)

@JammingBen

Copy link
Copy Markdown
Contributor Author

It will need some additions to the page object for the users page, so that the test can find where to click to re-send the email. Who should do that? (I can get someone to look at it tomorrow, if you like)

We take care 👍

@ChrisEdS

Copy link
Copy Markdown

Will this action only be showed when the user was invited via email initially?

@AlexAndBear

AlexAndBear commented May 25, 2021

Copy link
Copy Markdown

Will this action only be showed when the user was invited via email initially?

Nope, do you expect it to work that way?

@AlexAndBear AlexAndBear marked this pull request as ready for review May 25, 2021 13:44
Comment thread tests/acceptance/features/webUIAddUsers/addUsers.feature Outdated
Comment thread tests/acceptance/features/webUIAddUsers/addUsers.feature Outdated
Comment thread tests/acceptance/features/webUIAddUsers/addUsers.feature Outdated
@AlexAndBear AlexAndBear force-pushed the resend-invitation-email branch 2 times, most recently from f7ffaa0 to 464cece Compare May 25, 2021 14:33
@AlexAndBear AlexAndBear requested a review from phil-davis May 25, 2021 14:33
@AlexAndBear AlexAndBear force-pushed the resend-invitation-email branch from 464cece to c3bcc98 Compare May 25, 2021 14:40
@AlexAndBear

AlexAndBear commented May 25, 2021

Copy link
Copy Markdown

@phil-davis now we also cover, that the first link has an expired/invalid token. Thanks for the hint!

@phil-davis phil-davis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jvillafanez

Copy link
Copy Markdown
Member

Maybe a designer should check the icon. It isn't crystal clear to me that you'll send an email. The color is also different from the trashbin icon.

@jvillafanez jvillafanez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good

@AlexAndBear

AlexAndBear commented May 26, 2021

Copy link
Copy Markdown

@jvillafanez the color is different because we in a hover state in the first screen

@AlexAndBear AlexAndBear self-requested a review May 26, 2021 07:34

@AlexAndBear AlexAndBear left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add title attribute for tooltip
  • Make icon look similar to delete

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@mmattel

mmattel commented May 26, 2021

Copy link
Copy Markdown
Contributor

Maybe stupid but why not in addition a occ command set where you can trigger to resend an invite to either a named or all never logged in like:

occ resend-invite:list
occ resend-invite:send --all
occ resend-invite:send <name>

@JammingBen

Copy link
Copy Markdown
Contributor Author

Maybe stupid but why not in addition a occ command set where you can trigger to resend an invite to either a named or all never logged in like:

I personally find it more intuitive via WebUI. The admin creates users via UI, therefore it makes sense to place this action there, too. These commands could be a nice addition though.

@AlexAndBear

AlexAndBear commented May 26, 2021

Copy link
Copy Markdown

@mmattel can you point out a real-world use-case for the command?
@pmaier1 is the command included in the 'low effort' schedule ?

@AlexAndBear AlexAndBear requested a review from ChrisEdS May 26, 2021 11:11
@phil-davis

Copy link
Copy Markdown
Contributor

Note: IMO occ user:add does not currently have the ability to specify just the email address, and have an invitation email sent to the new user. It seems to always want a password. So maybe there are no admins currently using the command line to create users in this way.

@pmaier1

pmaier1 commented May 26, 2021

Copy link
Copy Markdown
Contributor

Thanks. As @phil-davis points out, the action is currently only available via Web UI. Therefore the FR also only applies to Web UI.

@AlexAndBear AlexAndBear merged commit 0777dad into master May 26, 2021
@delete-merged-branch delete-merged-branch Bot deleted the resend-invitation-email branch May 26, 2021 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants