forgejo/models/fixtures
Gusted 1b53a9e914
Don't return duplicated users who can create org repo (#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 keyed by user id in order to drop
duplicates.

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2023-01-30 18:12:45 +08:00
..
access.yml
access_token.yml
action.yml
attachment.yml
collaboration.yml
comment.yml
commit_status.yml
commit_status_index.yml
deleted_branch.yml
deploy_key.yml
email_address.yml
external_login_user.yml
follow.yml
gpg_key.yml
gpg_key_import.yml
hook_task.yml
issue.yml
issue_assignees.yml
issue_index.yml
issue_label.yml
issue_user.yml
issue_watch.yml
label.yml
lfs_meta_object.yml Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
login_source.yml
milestone.yml
notice.yml
notification.yml
oauth2_application.yml Record OAuth client type at registration (#21316) 2022-10-24 15:59:24 +08:00
oauth2_authorization_code.yml Record OAuth client type at registration (#21316) 2022-10-24 15:59:24 +08:00
oauth2_grant.yml Record OAuth client type at registration (#21316) 2022-10-24 15:59:24 +08:00
org_user.yml
project.yml Support org/user level projects (#22235) 2023-01-20 19:42:33 +08:00
project_board.yml Support org/user level projects (#22235) 2023-01-20 19:42:33 +08:00
project_issue.yml
protected_branch.yml
public_key.yml
pull_request.yml
reaction.yml
release.yml
renamed_branch.yml
repo_archiver.yml
repo_indexer_status.yml
repo_redirect.yml
repo_topic.yml
repo_transfer.yml
repo_unit.yml Test views of LFS files (#22196) 2022-12-23 07:41:56 +08:00
repository.yml Fix error when calculate the repository size (#22392) 2023-01-13 18:54:02 +00:00
review.yml
star.yml
stopwatch.yml
system_setting.yml
team.yml Don't return duplicated users who can create org repo (#22560) 2023-01-30 18:12:45 +08:00
team_repo.yml
team_unit.yml
team_user.yml Don't return duplicated users who can create org repo (#22560) 2023-01-30 18:12:45 +08:00
topic.yml
tracked_time.yml
two_factor.yml
user.yml Don't return duplicated users who can create org repo (#22560) 2023-01-30 18:12:45 +08:00
user_open_id.yml
user_redirect.yml
watch.yml
webauthn_credential.yml
webhook.yml