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

Admin should be able to delete repos via the API even if he is not a member of the organization #5443

Merged
merged 1 commit into from
Dec 2, 2018

Conversation

adelowo
Copy link
Member

@adelowo adelowo commented Dec 1, 2018

Fixes #5442

@lunny lunny added type/bug modifies/api This PR adds API routes or modifies them labels Dec 1, 2018
@lunny lunny modified the milestones: 1.6.1, 1.7.0 Dec 1, 2018
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@bc42b3a). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #5443   +/-   ##
=========================================
  Coverage          ?   37.57%           
=========================================
  Files             ?      317           
  Lines             ?    46821           
  Branches          ?        0           
=========================================
  Hits              ?    17593           
  Misses            ?    26734           
  Partials          ?     2494
Impacted Files Coverage Δ
routers/api/v1/repo/repo.go 51.03% <0%> (ø)

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 bc42b3a...2115af1. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 1, 2018
@adelowo adelowo changed the title admin should be able to delete repos even if he is not a member of the organization admin should be able to delete repos via the API even if he is not a member of the organization Dec 1, 2018
@lunny
Copy link
Member

lunny commented Dec 2, 2018

Is it necessary since you could delete a repo as admin via /api/v1/admin/repos/delete?

@bkcsoft bkcsoft 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 2, 2018
@adelowo
Copy link
Member Author

adelowo commented Dec 2, 2018

Is it necessary since you could delete a repo as admin via /api/v1/admin/repos/delete?

I think so since the admin powers should be applicable everywhere

@bkcsoft bkcsoft 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 2, 2018
@techknowlogick techknowlogick merged commit 9441bfa into go-gitea:master Dec 2, 2018
@techknowlogick
Copy link
Member

@adelowo please send backport to release/v1.6 branch 😄

@adelowo adelowo deleted the admin_deletion branch December 2, 2018 16:30
adelowo added a commit to adelowo/gitea that referenced this pull request Dec 2, 2018
@techknowlogick techknowlogick added the backport/done All backports for this PR have been created label Dec 2, 2018
@lafriks lafriks changed the title admin should be able to delete repos via the API even if he is not a member of the organization Admin should be able to delete repos via the API even if he is not a member of the organization Dec 2, 2018
lafriks pushed a commit that referenced this pull request Dec 2, 2018
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Admin cannot delete repository via API if he is not the owner of the organization
6 participants