mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-19 15:40:50 +00:00
Fixes (?) #25538 Fixes https://codeberg.org/forgejo/forgejo/issues/972 Regression #23879 #23879 introduced a change which prevents read access to packages if a user is not a member of an organization. That PR also contained a change which disallows package access if the team unit is configured with "no access" for packages. I don't think this change makes sense (at the moment). It may be relevant for private orgs. But for public or limited orgs that's useless because an unauthorized user would have more access rights than the team member. This PR restores the old behaviour "If a user has read access for an owner, they can read packages". --------- Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
819aed35bf
commit
321383db22
8 changed files with 384 additions and 27 deletions
|
@ -170,9 +170,9 @@ func TestAPIGetAll(t *testing.T) {
|
|||
var apiOrgList []*api.Organization
|
||||
|
||||
DecodeJSON(t, resp, &apiOrgList)
|
||||
assert.Len(t, apiOrgList, 9)
|
||||
assert.Equal(t, "org25", apiOrgList[1].FullName)
|
||||
assert.Equal(t, "public", apiOrgList[1].Visibility)
|
||||
assert.Len(t, apiOrgList, 11)
|
||||
assert.Equal(t, "Limited Org 36", apiOrgList[1].FullName)
|
||||
assert.Equal(t, "limited", apiOrgList[1].Visibility)
|
||||
|
||||
// accessing without a token will return only public orgs
|
||||
req = NewRequestf(t, "GET", "/api/v1/orgs")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue