gitlab 设置成管理员删除项目后但是拥有owner权限的用户仍然可以删除群组进而删除项目

Summary

客户通过gitlab管理界面 admin-设置-可见性与访问控制-允许删除项目-管理员 设置成只有管理员可以删除项目后,但是如果给某个群组分配了onwer权限后,那么这个onwer权限的权限虽然不能直接删除该群组下的项目,但是却可以直接删除这个群组,这样间接就拥有了删除项目的权限。

Steps to reproduce

验证需要专业版以上的license

  • 客户版本: gitlab-jh-15.5.4
  • 自测版本: gitlab-jh-15.5.4 gitlab-jh-16.2.3 gitlab-jh-16.4.1

设置管理员 允许删除项目

image

分配群组owner权限

群组权限 image 继承群组权限 image

通过owner权限的用户登录,发现可以删除此群组(但是如果直接删除群组下的项目的话,是没有权限删除的)

image

Example Project

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

王凯旋 编辑于