From a4148c0f12fe5a93d2c9a40f24d4813bcfef4ff8 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Mon, 1 Mar 2021 01:47:30 +0100 Subject: Repository transfer has to be confirmed, if user can not create repo for new owner (#14792) * make repo as "pending transfer" if on transfer start doer has no right to create repo in new destination * if new pending transfer ocured, create UI & Mail notifications --- routers/repo/view.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'routers/repo/view.go') diff --git a/routers/repo/view.go b/routers/repo/view.go index a5e3cbe3e4..39f16d183c 100644 --- a/routers/repo/view.go +++ b/routers/repo/view.go @@ -586,6 +586,14 @@ func Home(ctx *context.Context) { return } + if ctx.IsSigned { + // Set repo notification-status read if unread + if err := ctx.Repo.Repository.ReadBy(ctx.User.ID); err != nil { + ctx.ServerError("ReadBy", err) + return + } + } + var firstUnit *models.Unit for _, repoUnit := range ctx.Repo.Units { if repoUnit.Type == models.UnitTypeCode { -- cgit v1.2.3