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 UserHasBeenDeactivated hook to disconnect user #315

Merged
merged 6 commits into from
Aug 30, 2023

Conversation

MatthewDorner
Copy link
Contributor

Summary

Implement UserHasBeenDeactivated plugin hook to disconnect a user when that user is deactivated.

Ticket Link

Fixes #287

Maybe obvious, but in order to test, you have add to the plugin's go.mod: replace github.com/mattermost/mattermost-server/v6 v6.5.0 => ../mattermost-server to point to your local copy of server with the changes from my server PR: mattermost/mattermost#20894

@mattermod
Copy link
Contributor

Hello @MatthewDorner,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

@codecov
Copy link

codecov bot commented Aug 27, 2022

Codecov Report

Patch coverage has no change and project coverage change: -0.04% ⚠️

Comparison is base (835b440) 32.94% compared to head (ea61627) 32.91%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #315      +/-   ##
==========================================
- Coverage   32.94%   32.91%   -0.04%     
==========================================
  Files          22       22              
  Lines        4013     4017       +4     
==========================================
  Hits         1322     1322              
- Misses       2560     2564       +4     
  Partials      131      131              
Files Changed Coverage Δ
server/plugin.go 14.39% <0.00%> (-0.09%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mattermod
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@MatthewDorner
Copy link
Contributor Author

@mickmister @ashishbhate Updated here to match the updated plugin hook function signature in the server PR.

Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

Neat 🎉

@hanzei hanzei added 3: QA Review Requires review by a QA tester Awaiting Submitter Action Blocked on the author Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) and removed Lifecycle/1:stale Awaiting Submitter Action Blocked on the author labels Sep 18, 2022
@mickmister
Copy link
Contributor

Maybe obvious, but in order to test, you have add to the plugin's go.mod: replace github.com/mattermost/mattermost-server/v6 v6.5.0 => ../mattermost-server to point to your local copy of server with the changes from my server PR: mattermost/mattermost#20894

Note that this means we have to adjust this project's go.mod to point the appropriate server version after the new server version is released

Copy link
Member

@spirosoik spirosoik left a comment

Choose a reason for hiding this comment

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

nice 🎉

@mattermod
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@hanzei hanzei added this to the v1.7.0 milestone Nov 29, 2022
@hanzei
Copy link
Collaborator

hanzei commented Feb 22, 2023

@DHaussermann Gentle reminder to review this PR

@mattermost-build
Copy link
Contributor

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!

@trilopin trilopin modified the milestones: v1.7.0, v1.8.0 Apr 19, 2023
@DHaussermann
Copy link

/update-branch

@hanzei hanzei modified the milestones: v1.8.0, v1.7.0 Jun 28, 2023
@hanzei hanzei self-assigned this Jul 13, 2023
@hanzei
Copy link
Collaborator

hanzei commented Aug 21, 2023

#393 needs to get merged first.

@hanzei hanzei modified the milestones: v1.7.0, v1.8.0 Aug 23, 2023
@hanzei hanzei removed Lifecycle/1:stale Do Not Merge/Awaiting PR Awaiting another pull request before merging (e.g. server changes) labels Aug 30, 2023
@hanzei
Copy link
Collaborator

hanzei commented Aug 30, 2023

Tested and confirmed that users who get deactivated also disconnect from GitLab. Ready for merging 🚀

@hanzei hanzei added 4: Reviews Complete All reviewers have approved the pull request and removed 3: QA Review Requires review by a QA tester labels Aug 30, 2023
@hanzei
Copy link
Collaborator

hanzei commented Aug 30, 2023

Thanks, @MatthewDorner, for the contribution. Sorry, it took so long.

@hanzei hanzei merged commit 4697cd7 into mattermost:master Aug 30, 2023
9 checks passed
@avas27JTG avas27JTG mentioned this pull request Nov 29, 2023
@avas27JTG avas27JTG modified the milestones: v1.9.0, v1.8.0 Nov 29, 2023
@mickmister mickmister mentioned this pull request Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GitLab users are not disconnected when their Mattermost account is deactivated
9 participants