Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
May 26, 2021

Conversation

JammingBen
Copy link
Contributor

@JammingBen JammingBen commented May 25, 2021

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

@phil-davis @JammingBen acceptance tests needed ?

@phil-davis
Copy link
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
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
Contributor

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

@AlexAndBear
Copy link

AlexAndBear commented May 25, 2021

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
@AlexAndBear AlexAndBear force-pushed the resend-invitation-email branch 2 times, most recently from f7ffaa0 to 464cece Compare May 25, 2021 14:33
@AlexAndBear
Copy link

AlexAndBear commented May 25, 2021

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

Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

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

LGTM

@jvillafanez
Copy link
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.

Copy link
Member

@jvillafanez jvillafanez left a comment

Choose a reason for hiding this comment

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

Code looks good

@AlexAndBear
Copy link

AlexAndBear commented May 26, 2021

@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
Copy link

@AlexAndBear AlexAndBear left a comment

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

@sonarcloud
Copy link

sonarcloud bot commented May 26, 2021

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
Copy link
Contributor

mmattel commented May 26, 2021

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
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
Copy link

AlexAndBear commented May 26, 2021

@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
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
Copy link
Contributor

pmaier1 commented May 26, 2021

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