-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Automatically remove Watches, Assignments, etc if user loses access due to being removed as collaborator or from a team #10997
Conversation
… as a collaborator
…member of a team that can access the repo
Co-Authored-By: 6543 <[email protected]>
Co-Authored-By: 6543 <[email protected]>
THIS is ready for review |
Codecov Report
@@ Coverage Diff @@
## master #10997 +/- ##
==========================================
- Coverage 43.60% 43.39% -0.21%
==========================================
Files 597 597
Lines 83923 84547 +624
==========================================
+ Hits 36594 36691 +97
- Misses 42817 43330 +513
- Partials 4512 4526 +14
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is right but I have two questions:
- The deletecollaboration call just removes watchers etc without checking if the user would still have access, should we check if the user would still have access before doing those?
- Do we need to do a similar change for removal from team
|
It might be better to just move them all in to this. They're all related. |
@zeripath done |
ping |
Thanks a lot mate. Really appreciate you completing this. |
…ue to being removed as collaborator or from a team (go-gitea#10997) * remove a user from being assigned to any issue/PR if (s)he is removed as a collaborator * fix gender specific comment * do not remove users that still have access to the repo if they are a member of a team that can access the repo * add context to errors * updates * incorporate review fixes * Update models/repo_collaboration.go Co-Authored-By: 6543 <[email protected]> * Update models/repo_collaboration.go Co-Authored-By: 6543 <[email protected]> * Fix Rebase Relict * Fix & Impruve * use xorm builder * all in one session * generalize reconsiderIssueAssignees * Only Unwatch if have no access anymore * prepare for reuse * Same things if remove User from Team * fix lint * let mysql take time to react * add description * CI.restart() * CI.restart() Co-authored-by: Lanre Adelowo <[email protected]> Co-authored-by: techknowlogick <[email protected]> Co-authored-by: Lauris BH <[email protected]>
continue #5676
fix #5673
Include #11003