Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix org owner cannot be removed if he is not in owner team #3164

Merged
merged 2 commits into from
Dec 12, 2017

Conversation

lunny
Copy link
Member

@lunny lunny commented Dec 12, 2017

As title.

@lunny lunny added the type/bug label Dec 12, 2017
@lunny lunny added this to the 1.4.0 milestone Dec 12, 2017
@lunny lunny changed the title Fix org owner cannot be removed if there is not in owner team Fix org owner cannot be removed if he is not in owner team Dec 12, 2017
@codecov-io
Copy link

codecov-io commented Dec 12, 2017

Codecov Report

Merging #3164 into master will decrease coverage by 0.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3164      +/-   ##
==========================================
- Coverage   34.75%   34.74%   -0.02%     
==========================================
  Files         276      276              
  Lines       39945    39949       +4     
==========================================
- Hits        13883    13879       -4     
- Misses      24069    24074       +5     
- Partials     1993     1996       +3
Impacted Files Coverage Δ
models/org.go 68.55% <50%> (-0.39%) ⬇️
models/repo_indexer.go 50.97% <0%> (-0.98%) ⬇️
models/repo.go 41.28% <0%> (-0.19%) ⬇️

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 9f033bf...753f1c6. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 12, 2017
@ethantkoenig
Copy link
Member

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 12, 2017
@ethantkoenig
Copy link
Member

What exactly is the difference between being an owner (i.e. OrgUser.IsOwner set to true) vs. being on the owner team? Do we need both, or can we combine the notions?

@lunny
Copy link
Member Author

lunny commented Dec 12, 2017

That should be a bug or something. The steps are:

  1. create a new organization, then you will be owner of organization and also in owner team;
  2. add another people to owner team;
  3. leave the owner team.
    Then you will be an owner of organization but not in owner team.

@ethantkoenig
Copy link
Member

@lunny I understand how to reproduce the bug, I'm just asking why we need the OrgUser.IsOwner field, as well as an owner team. My comment was not specific to this PR, but was just a general question/suggestion.

Would it make sense to get rid of the OrgUser.IsOwner field completely? What do we need it for?

@lunny
Copy link
Member Author

lunny commented Dec 12, 2017

@ethantkoenig this is a history problem. Old gitea version allow add member who are not in any team, but new version ask all org members be at least one team. I think it's time to get rid of the OrgUser.IsOwner field completely in v1.4.

@lafriks
Copy link
Member

lafriks commented Dec 12, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 12, 2017
@lafriks lafriks merged commit 859b9ad into go-gitea:master Dec 12, 2017
@lunny lunny deleted the lunny/fix_no_team_owner branch December 13, 2017 01:09
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants