Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't return duplicated users who can create org repo #22560

Merged
merged 11 commits into from
Jan 30, 2023

Commits on Jan 21, 2023

  1. Don't return duplicated users who can create org repo

    - 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`](https://github.com/go-gitea/gitea/blob/a1fcb1cfb84fd6b36c8fe9fd56588119fa4377bc/models/organization/org_test.go#L435)
    is the test function that tests for this.
    - The fix is quite trivial, which is adding `DISTINCT` keyword to `` `user`.id ``.
    Gusted committed Jan 21, 2023
    Configuration menu
    Copy the full SHA
    c291563 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2583096 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2023

  1. Configuration menu
    Copy the full SHA
    95cf48c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    77d56f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3c7dcbe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5c5782e View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2023

  1. Configuration menu
    Copy the full SHA
    1f2cf00 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2023

  1. Configuration menu
    Copy the full SHA
    945e27a View commit details
    Browse the repository at this point in the history
  2. Add comment

    Gusted committed Jan 29, 2023
    Configuration menu
    Copy the full SHA
    d496103 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2970e4a View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2023

  1. Configuration menu
    Copy the full SHA
    4cefc91 View commit details
    Browse the repository at this point in the history