]> source.dussan.org Git - gitea.git/commit
Revert package access change from #23879 (#25707)
authorKN4CK3R <admin@oldschoolhack.me>
Sun, 9 Jul 2023 13:00:07 +0000 (15:00 +0200)
committerGitHub <noreply@github.com>
Sun, 9 Jul 2023 13:00:07 +0000 (13:00 +0000)
commit321383db22b19e302aafe59194f0b6539257d90f
tree135d83b42bffe38082dde5ccf3b7515c9ca2c2b7
parent819aed35bff81574920c2a87eddbebed5ddfda1f
Revert package access change from #23879 (#25707)

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>
models/fixtures/org_user.yml
models/fixtures/team.yml
models/fixtures/team_unit.yml
models/fixtures/team_user.yml
models/fixtures/user.yml
modules/context/package.go
tests/integration/api_org_test.go
tests/integration/api_packages_test.go