diff options
author | Zettat123 <zettat123@gmail.com> | 2024-02-24 20:38:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-24 12:38:43 +0000 |
commit | c42083a33950be6ee9f822c6d0de3c3a79d1f51b (patch) | |
tree | abbcefa5ef6f76d7c61a15c0836efa0907d7c2d9 /models/user | |
parent | 267dbb4e938cc42dc09a4a893cca631b2f755557 (diff) | |
download | gitea-c42083a33950be6ee9f822c6d0de3c3a79d1f51b.tar.gz gitea-c42083a33950be6ee9f822c6d0de3c3a79d1f51b.zip |
Allow non-admin users to delete review requests (#29057)
Fix #14459
The following users can add/remove review requests of a PR
- the poster of the PR
- the owner or collaborators of the repository
- members with read permission on the pull requests unit
Diffstat (limited to 'models/user')
-rw-r--r-- | models/user/user_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/user/user_test.go b/models/user/user_test.go index f3e5a95b1e..68cee9cdbd 100644 --- a/models/user/user_test.go +++ b/models/user/user_test.go @@ -89,7 +89,7 @@ func TestSearchUsers(t *testing.T) { []int64{19, 25}) testOrgSuccess(&user_model.SearchUserOptions{OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 4, PageSize: 2}}, - []int64{26}) + []int64{26, 41}) testOrgSuccess(&user_model.SearchUserOptions{ListOptions: db.ListOptions{Page: 5, PageSize: 2}}, []int64{}) @@ -101,13 +101,13 @@ func TestSearchUsers(t *testing.T) { } testUserSuccess(&user_model.SearchUserOptions{OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 1}}, - []int64{1, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30, 32, 34, 37}) + []int64{1, 2, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30, 32, 34, 37, 38, 39, 40}) testUserSuccess(&user_model.SearchUserOptions{ListOptions: db.ListOptions{Page: 1}, IsActive: util.OptionalBoolFalse}, []int64{9}) testUserSuccess(&user_model.SearchUserOptions{OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 1}, IsActive: util.OptionalBoolTrue}, - []int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30, 32, 34, 37}) + []int64{1, 2, 4, 5, 8, 10, 11, 12, 13, 14, 15, 16, 18, 20, 21, 24, 27, 28, 29, 30, 32, 34, 37, 38, 39, 40}) testUserSuccess(&user_model.SearchUserOptions{Keyword: "user1", OrderBy: "id ASC", ListOptions: db.ListOptions{Page: 1}, IsActive: util.OptionalBoolTrue}, []int64{1, 10, 11, 12, 13, 14, 15, 16, 18}) |