-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 require team membership for team search results #21174
Conversation
another regression from go-gitea#18518
CI failure is related. |
apiTeams[i] = &api.Team{
ID: teams[i].ID,
Name: teams[i].Name,
Description: teams[i].Description,
IncludesAllRepositories: teams[i].IncludesAllRepositories,
CanCreateOrgRepo: teams[i].CanCreateOrgRepo,
Permission: teams[i].AccessMode.String(),
Units: teams[i].GetUnitNames(),
UnitsMap: teams[i].GetUnitsMap(),
} Which information is exactly needed, maybe we could limit it to just the necessary fields? I do find this to be quite "senstive" as it laids out the whole team structure in a organization. |
I want to know which teams exist with what purpose, so I know what access to request. So
Under what premise is this a bad thing? I can see it as a social engineering attack vector, but that's about it. My main goal here is to make the API permissions consistent, I don't see a strictly better option. |
I'm sorry @noerw for the late reaction, I'm pretty sure I was misunderstanding this code and situation. Limiting the return results to Name + Description is fine IMO. |
replaced by #20844 |
Another regression from #18518.
Note that tests for other routes expect non-team-members not to have access to it:
gitea/tests/integration/api_team_test.go
Line 42 in 4aafe26
gitea/routers/web/org/teams.go
Line 342 in 7922431
But I'd argue this assumption breaks the quite valid use-case of searching for teams you are not a member of.
Also the
/api/v1/orgs/{org}/teams
endpoint (available to org members) will happily list all existing teams, so there is some inconsistency here already. I'd say you don't need to be team member to see details, as the information gained is not exactly sensitive.related discussion for permissions in the frontend:
SearchTeam
#20844