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

Backport #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