Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 10:46:10 +01:00
forgejo/models/activities
Gusted fd2c250b52
Don't return duplicated users who can create org repo (#22560) (#22562)
- Backport of #22560
- Currently the function `GetUsersWhoCanCreateOrgRepo` uses a query that
is able to have duplicated users in the result, this is can happen under
the condition that a user is in team that either is the owner team or
has permission to create organization repositories.
- Add test code to simulate the above condition for user 3,
[`TestGetUsersWhoCanCreateOrgRepo`](a1fcb1cfb8/models/organization/org_test.go (L435))
is the test function that tests for this.
  - The fix is quite trivial, use a map as a set to get distinct orgs.
2023-01-30 16:59:20 +00:00
..
action.go Use complete SHA to create and query commit status (#22244) (#22257) 2022-12-28 11:03:21 +01:00
action_list.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
action_test.go Use absolute links in feeds (#21229) 2022-09-21 16:51:42 -04:00
main_test.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
notification.go Don't return duplicated users who can create org repo (#22560) (#22562) 2023-01-30 16:59:20 +00:00
notification_test.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
repo_activity.go Replace all instances of fmt.Errorf(%v) with fmt.Errorf(%w) (#21551) 2022-10-24 20:29:17 +01:00
statistic.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
user_heatmap.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00
user_heatmap_test.go Move some files into models' sub packages (#20262) 2022-08-25 10:31:57 +08:00