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

API pull's head/base have correct permission #17214

Merged
merged 6 commits into from
Oct 7, 2021
Merged

Conversation

pricly-yellow
Copy link
Contributor

Closes #17181

  • for all pull requests API return permissions of caller
  • for all webhook return empty permissions

* for all pull requests API return permissions of caller
* for all webhook return empty permissions

Signed-off-by: Danila Kryukov <pricly_yellow@dismail.de>
modules/convert/pull.go Outdated Show resolved Hide resolved
modules/convert/pull.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 4, 2021
@codecov-commenter
Copy link

Codecov Report

Merging #17214 (f387b03) into main (f2e7d54) will decrease coverage by 0.04%.
The diff coverage is 49.89%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #17214      +/-   ##
==========================================
- Coverage   45.31%   45.26%   -0.05%     
==========================================
  Files         773      779       +6     
  Lines       86873    87301     +428     
==========================================
+ Hits        39366    39520     +154     
- Misses      41151    41367     +216     
- Partials     6356     6414      +58     
Impacted Files Coverage Δ
cmd/admin.go 0.00% <0.00%> (ø)
models/action.go 48.86% <0.00%> (ø)
models/avatar.go 35.38% <0.00%> (ø)
models/error.go 39.83% <ø> (+0.29%) ⬆️
models/fixture_generation.go 70.00% <0.00%> (ø)
models/gpg_key_verify.go 13.46% <0.00%> (ø)
models/helper.go 52.94% <0.00%> (ø)
models/issue_lock.go 0.00% <0.00%> (ø)
models/migrate.go 0.00% <0.00%> (ø)
models/pull_sign.go 37.64% <0.00%> (ø)
... and 217 more

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 dd22c65...f387b03. Read the comment docs.

Co-authored-by: delvh <dev.lh@web.de>
@GiteaBot GiteaBot 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 Oct 4, 2021
@6543 6543 added modifies/api This PR adds API routes or modifies them backport/v1.15 type/bug labels Oct 6, 2021
modules/convert/pull.go Outdated Show resolved Hide resolved
@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 Oct 6, 2021
Co-authored-by: 6543 <6543@obermui.de>
@6543 6543 added this to the 1.16.0 milestone Oct 6, 2021
@6543
Copy link
Member

6543 commented Oct 7, 2021

🚀

@6543 6543 merged commit 4afdb1e into go-gitea:main Oct 7, 2021
@6543 6543 added the backport/done All backports for this PR have been created label Oct 7, 2021
lafriks pushed a commit that referenced this pull request Oct 7, 2021
* for all pull requests API return permissions of caller
* for all webhook return empty permissions

Signed-off-by: Danila Kryukov <pricly_yellow@dismail.de>

* Fix incorrect error handler

Co-authored-by: delvh <dev.lh@web.de>

* Fix wrong assumption in tests

* Change paramenter name to doer to indicate source

Co-authored-by: 6543 <6543@obermui.de>

Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
Chianina pushed a commit to Chianina/gitea that referenced this pull request Oct 15, 2021
close go-gitea#17181

* for all pull requests API return permissions of caller
* for all webhook return empty permissions

Signed-off-by: Danila Kryukov <pricly_yellow@dismail.de>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
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.

[API] /repos/{owner}/{repo}/pulls/{index} returns false for all permissions of the base/head branch repo
7 participants