From 71979d9663d8e43b772c37f2a79af5b8911df661 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Tue, 7 Apr 2020 23:52:01 +0200 Subject: Automatically remove Watches, Assignments, etc if user loses access due to being removed as collaborator or from a team (#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 <6543@obermui.de> * Update models/repo_collaboration.go Co-Authored-By: 6543 <6543@obermui.de> * 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 Co-authored-by: techknowlogick Co-authored-by: Lauris BH --- integrations/release_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'integrations') diff --git a/integrations/release_test.go b/integrations/release_test.go index be0abd5e34..176f83d55a 100644 --- a/integrations/release_test.go +++ b/integrations/release_test.go @@ -8,6 +8,7 @@ import ( "fmt" "net/http" "testing" + "time" "code.gitea.io/gitea/modules/test" @@ -63,6 +64,9 @@ func TestViewReleases(t *testing.T) { session := loginUser(t, "user2") req := NewRequest(t, "GET", "/user2/repo1/releases") session.MakeRequest(t, req, http.StatusOK) + + // if CI is to slow this test fail, so lets wait a bit + time.Sleep(time.Millisecond * 100) } func TestViewReleasesNoLogin(t *testing.T) { -- cgit v1.2.3