mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-16 15:55:56 +00:00
Improve permission check of packages (#23879)
At first, we have one unified team unit permission which is called `Team.Authorize` in DB. But since https://github.com/go-gitea/gitea/pull/17811, we allowed different units to have different permission. The old code is only designed for the old version. So after #17811, if org users have write permission of other units, but have no permission of packages, they can also get write permission of packages. Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
parent
5cb394ff2f
commit
bbf83f5d4b
8 changed files with 63 additions and 26 deletions
|
@ -172,4 +172,15 @@
|
|||
num_repos: 0
|
||||
num_members: 0
|
||||
includes_all_repositories: false
|
||||
can_create_org_repo: true
|
||||
can_create_org_repo: true
|
||||
|
||||
-
|
||||
id: 17
|
||||
org_id: 23
|
||||
lower_name: team14writeauth
|
||||
name: team14WriteAuth
|
||||
authorize: 2 # write
|
||||
num_repos: 0
|
||||
num_members: 1
|
||||
includes_all_repositories: false
|
||||
can_create_org_repo: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue