-
-
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
Some repos are missing in global and org code search #23474
Comments
I have narrowed it down to the following SQL query: SELECT name from repository where id in (
SELECT repo_id FROM team_repo
INNER JOIN team_user ON `team_user`.team_id = `team_repo`.team_id
INNER JOIN team_unit ON `team_unit`.team_id = `team_repo`.team_id
WHERE `team_user`.uid=1234
AND `team_unit`.`type`=1
AND `team_unit`.`access_mode`>0
) It seems the |
I think the |
So I fixed the affected teams with this SQL: update team_unit set access_mode = 4 where id in (
select id from (
select team_unit.id from team_unit
inner join team on team_unit.team_id = team.id
where name = "Owners" and team_unit.access_mode = 0
) as _
) Creating a new org seems again create Owner teams with select distinct(team.id) from team_unit
inner join team on team_unit.team_id = team.id
where name = "Owners" and team_unit.access_mode = 0; |
Reproduces locally as well. Just create a new org and check the
|
Fixed by #23675 |
Description
I have one odd issue with code search where results from some repos do not show up in the global code search or the organization code search. The user is member of the default
Owners
team of two repos, let's call themorg1/repo1
andorg2/repo2
.query
in one of their files/org1/repo1/search?q=query
shows results/org2/repo2/search?q=query
shows results/org1/-/code?q=query
shows results/org2/-/code?q=query
show NO results/explore/code?q=query
shows NO results fromrepo2
, only fromrepo1
repo2
as collaborator fixes the issuerepo2
to public access fixes the issueorg2
to public access has no effectThere is probably still some difference in these repos in the database, but I'm not sure what to look at. Any pointers appreciated on what to look for.
Gitea Version
1.19.0+rc1-37-g0a0f46f29
Can you reproduce the bug on the Gitea demo site?
No
Database
MySQL
The text was updated successfully, but these errors were encountered: