Skip to content

Use handlers for API authorization #723

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

Merged
merged 1 commit into from
Jan 26, 2017
Merged

Conversation

ethantkoenig
Copy link
Member

@ethantkoenig ethantkoenig commented Jan 22, 2017

There were already handlers for enforcing organization membership/ownership in api.go (reqOrgMembership() and reqOrgOwnership()), but a lot of API endpoints did not use them. Using the handlers eliminates a lot of duplicated code.

I also moved endpoints that should not require admin (add/remove a repo to a team) out of api/v1/admin/, and fixed an incorrect error message in reqOrgOwnership().

@lunny lunny added this to the 1.1.0 milestone Jan 23, 2017
@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Jan 23, 2017
@lunny
Copy link
Member

lunny commented Jan 25, 2017

LGTM

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

lunny commented Jan 25, 2017

let L-G-T-M work

@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 Jan 25, 2017
@Bwko
Copy link
Member

Bwko commented Jan 26, 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 Jan 26, 2017
@lunny lunny merged commit d1b5498 into go-gitea:master Jan 26, 2017
@ethantkoenig ethantkoenig deleted the api/refactor branch January 27, 2017 17:17
@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/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants