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 bug on branch API #10767

Merged
merged 1 commit into from
Mar 19, 2020
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Mar 19, 2020

Fix #10738. When request the API with a non-login user, you cannot use user.ID so that it will panic. This PR let canpush and canmerge as false if not login.

@lunny lunny added this to the 1.12.0 milestone Mar 19, 2020
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 19, 2020
@GiteaBot GiteaBot 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 Mar 19, 2020
@techknowlogick techknowlogick merged commit 83fe7d4 into go-gitea:master Mar 19, 2020
@techknowlogick
Copy link
Member

@lunny please backport :)

@lunny lunny deleted the lunny/fix_branch_api branch March 19, 2020 15:46
lunny added a commit to lunny/gitea that referenced this pull request Mar 20, 2020
@lunny lunny added the backport/done All backports for this PR have been created label Mar 20, 2020
lafriks pushed a commit that referenced this pull request Mar 20, 2020
* Fix bug on branch API (#10767)

* Fix branch api canPush and canMerge
@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. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling branch protection rules disables api requests without authorization token
4 participants