Skip to content

Email notification when user's role is changed/removed. #3853

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

Closed
wants to merge 2 commits into from

Conversation

waseem18
Copy link
Contributor

@waseem18 waseem18 commented Apr 29, 2018

PR which addresses issues on #3306

  • Send email to the user whose role has been changed/removed.
  • Send email to other owners of the project.
  • The person who made the change will not receive the email.

Closes #3264

@waseem18
Copy link
Contributor Author

waseem18 commented Apr 29, 2018

Right now going through the code review comments of #3306 . Will address them (if they're missing).

@waseem18
Copy link
Contributor Author

waseem18 commented May 2, 2018

Thanks for the reviews @di I'll address them soon.

@waseem18 waseem18 force-pushed the issue-3264 branch 2 times, most recently from 114b27f to 0baa4d0 Compare May 5, 2018 20:20
@waseem18
Copy link
Contributor Author

waseem18 commented May 5, 2018

Addressed reviews @di

Copy link
Member

@di di left a comment

Choose a reason for hiding this comment

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

@waseem18 Looks like only some templates got updated. I've put comments everywhere there needs to be an update to be more clear.

Also, could you push new commits here instead of amending to the existing one? It makes it a lot easier for us to review.

@waseem18
Copy link
Contributor Author

waseem18 commented May 8, 2018

@di Thanks for taking your time to review this PR. I've addressed the code reviews in a new commit.

Thanks

@di di added good first issue This issue is ideal for first-time contributors! PyCon-2018-sprint labels May 15, 2018
@di
Copy link
Member

di commented May 15, 2018

Could someone at the sprints check this PR out and review it?

- Send email to the user whose role has been changed/removed.
- Send email to other owners of the project.
- The person who made the change will not receive the email.

Closes pypi#3264

Make linters happy

Improve the tests and coverage

Update email text.

Notify all owners for any role changes.

Update email subjects.
Update tests.

Since we're always sending email to all owners now when role changed,
email recipients shouldn't ever be empty.

The order matters?

Reordering list ordering issue

Minor changes

Resolved a lint issue

Resolved code reviews

Used {%- -%} to strip additional new lines

Resolved lint issue
Your role in the {{ project }} project has been changed by {{ submitter }}.

{% if role == 'Owner' -%}
You are now a project owner. This means that you may add other collaborators,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
You are now a project owner. This means that you may add other collaborators,
You are now a project owner. This means that you can add other collaborators,

upload releases for the project, delete files and releases, or delete the entire
project.
{%- elif role == 'Maintainer' -%}
You are now a project maintainer. This means that you may upload releases for
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
You are now a project maintainer. This means that you may upload releases for
You are now a project maintainer. This means that you can upload releases for

by {{ submitter }}.

{% if role == 'Owner' -%}
You are now a project owner. This means that you may add other collaborators,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
You are now a project owner. This means that you may add other collaborators,
You are now a project owner. This means that you can add other collaborators,

Copy link
Contributor

Choose a reason for hiding this comment

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

we should be consistent and use 'can' everywhere.

upload releases for the project, delete files and releases, or delete the entire
project.
{%- elif role == 'Maintainer' -%}
You are now a project maintainer. This means that you may upload releases for
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
You are now a project maintainer. This means that you may upload releases for
You are now a project maintainer. This means that you can upload releases for

You are now a project maintainer. This means that you may upload releases for
the project. You cannot add collaborators, delete files, delete releases, or
delete the project.
{%- endif %}

Congratulations!
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if "Congratulations!" is always appropriate for this email. WDYT @di?


Congratulations!

If this was a mistake, you can reply to this email directly to communicate with
If this was a mistake, you can email [email protected] to communicate with
Copy link
Contributor

Choose a reason for hiding this comment

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

@di are you happy with this alternative?

@nlhkabu
Copy link
Contributor

nlhkabu commented Nov 18, 2018

Thanks for this PR @waseem18 and from addressing the feedback from @di
I've added a couple of extra comments in the templates, but otherwise they look good :)

@yeraydiazdiaz or @ewdurbin would either of you be able to complete an additional review here?

@waseem18
Copy link
Contributor Author

Thanks for the review @nlhkabu. I'll address the feedback tonight

@brainwane
Copy link
Contributor

Hi @waseem18 -- I'd love to help get this PR finished and merged! Would you be interested in addressing the existing reviews and rebasing?

Thanks!

@waseem18
Copy link
Contributor Author

Yes @brainwane

I'll address the reviews tonight.

@di di removed the good first issue This issue is ideal for first-time contributors! label May 13, 2019
@brainwane
Copy link
Contributor

@waseem18 Thanks for your work on this. To do this the right way, we should wait till we have #5863 implemented, so we can draw on the event logging and use it to trigger this notification. I'm sorry for the additional wait! Looking forward to getting help with some of the other open issues in the meantime!

@nlhkabu nlhkabu added the UX/UI design, user experience, user interface label May 20, 2019
@nlhkabu
Copy link
Contributor

nlhkabu commented Sep 15, 2019

Note:
If / when this PR is re-reviewed, we will need to ensure that the templates are appropriately translated.

@brainwane
Copy link
Contributor

@waseem18 Now that the audit log feature is available, we'd love you to take a fresh look at this pull request!

@brainwane
Copy link
Contributor

@waseem18 or @rascalking would you like to follow up on this?

@waseem18
Copy link
Contributor Author

waseem18 commented Mar 3, 2020

@brainwane I may not be able to continue the work on this as of now.

@rascalking
Copy link
Contributor

Yup, taking a look at this now (sorry for the delay).

@brainwane
Copy link
Contributor

@rascalking Thanks for working on it! And no problem re: the delay. Hope you and yours are doing well.

@di
Copy link
Member

di commented Aug 5, 2020

Fixed by #8328, thanks for your work here!

@di di closed this Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX/UI design, user experience, user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Email notification for demoted/removed user
6 participants