When repository, within an organization which has visibility set to Private, is set as public and user is part of a team that has no access specified to this repository, repository can be accessed via direct URI but can not be viewed on any list within UI.
I would expect that setting repository as public within Private organization would allow members of all teams to view it, regardless of team's permissions and team's repositories (for example I might want to make repository visible but read-only to all members of organization, while certain teams can write to different repositories).
This does not apply when organization is set as Limited. In such a case, repository is properly visible (to both members of organization as well as outside users).
Owners of org can of course see all repositories just fine.
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.
@proton-ab does this still be the case on 1.11.4 or master?
@6543 yes, as a member of team that has access to certain private repositories within organization I still can not see the public repositories in that organization. I can access them directly but otherwise they are hidden.
The issue seems to be present in SearchRepositoryCondition
, specifically in condition that handles if opts.OwnerID > 0
. Repository will be visible here only if:
AllPublic
is true
- but the organization is not publicAllLimited
is true
- but the organization is not limitedAs you can see, all 3 cases are false, hence the repository is never shown.
Can you reproduce on try? I can't seem to reproduce this.
The screenshots included are from try, I can't really link you because org has to be private.
The reproduction steps however are as follow:
It's weird because I literally just did those steps on master and on try and did not have this problem...
The two users are [email protected] and [email protected] their passwords are their email addresses as they predate the (imho unnecessary) password rules. The private org is arprivateOrg.
Arandomer is the owner, tester_mailinator is the user.
You have added the ArPublic
repository as accessible to a team 'writers' which [email protected]
is part of, hence they can write to it. The bug describes situation where user is member of a team that does not have explicit access to public repository via team. I have now corrected the mistake, please check now.
Maybe we should reopen it, the mentioned PR does not fix issue entirely; explore page is still missing public repo but shows private one.
Also unsure if dashboard should show such repo or not; currently it does not since user is not contributor, but maybe being member of organization should trump that requirement for public repos?
yeah I don't think that I have solved this!
If an organization is private and public repositories are shown this also shows the (existence of the) organization, no? So what would the benefit be to have a private organization?
The reason I am asking this is: I created a private organization ("visible only to organization members") and somehow expected all repos to be invisible/private, however, I was able to clone it as an anonymous user.
@mschoettle that sounds like another bug - could you open another issue please
@mschoettle Public repositories within private organization are visible to all members of said organization. I can not reproduce your report (ability to clone public repositories of private organization by either anonymous user or user without access to organization)
@CirnoT I just tried it on https://try.gitea.io and could reproduce it.
I opened another issue: #11651