gitea icon indicating copy to clipboard operation
gitea copied to clipboard

Do not allow organisation owners add themselves as collaborator

Open 42wim opened this issue 3 years ago • 3 comments

We're already checking for repo owners, but we also need to check for organisation owners that try to add themselves as collaborator

Closes #17966

42wim avatar Jun 19 '22 19:06 42wim

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@1818149). Click here to learn what that means. The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main   #20043   +/-   ##
=======================================
  Coverage        ?   46.88%           
=======================================
  Files           ?      976           
  Lines           ?   135169           
  Branches        ?        0           
=======================================
  Hits            ?    63373           
  Misses          ?    64031           
  Partials        ?     7765           
Impacted Files Coverage Δ
routers/web/repo/setting.go 16.76% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1818149...9821553. Read the comment docs.

codecov-commenter avatar Jul 14 '22 22:07 codecov-commenter

Hmm... I am actually wondering if we're doing a silly thing by adding these checks and we're preventing actually wanted behaviour.

For example, with repository transfer and restricted creation I could imagine a situation whereby a repository creating user might want to set up repos to be transferred to other restricted users but add themselves as a collaborator before transferring the repo away.

I'm not sure if this is a good idea and perhaps we should just be warning instead of preventing this behaviour

zeripath avatar Jul 15 '22 04:07 zeripath

Ping @lunny

Can you describe more details about #17966 ?

  • https://github.com/go-gitea/gitea/issues/17966

wxiaoguang avatar Jul 15 '22 04:07 wxiaoguang

well if you move repo you always can add colaborator afterwards ... in that case after move check should pass

6543 avatar Sep 27 '22 22:09 6543