]> source.dussan.org Git - gitea.git/commit
Fix deadlock when deleting team user (#13092)
authorzeripath <art27@cantab.net>
Sat, 10 Oct 2020 19:48:58 +0000 (20:48 +0100)
committerGitHub <noreply@github.com>
Sat, 10 Oct 2020 19:48:58 +0000 (22:48 +0300)
commit6f2784911fe739d3b83787b7984c1b8a2fb31690
tree0227ef1ece90d639fe54f73ec380944b896f73fd
parentd65cd5677af3df5d616bf48dfd4be354e23c184f
Fix deadlock when deleting team user (#13092)

`models.getUserRepoPermission(...)` calls `HasOrgVisible` which
uses `models.x` potentially outside of the transaction `e` provided
as an argument to `getUserRepoPermission`.

This PR switches to use `hasOrgVisible(e, ...)`.

Fix #12983

Signed-off-by: Andrew Thornton <art27@cantab.net>
models/repo_permission.go