Cannot add attachment to issue without admin access #10919

Closed
opened 2025-11-02 09:22:07 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @hakito on GitHub (May 26, 2023).

Description

I have an issue created by User A.

I try to add an attachment via API for user B. User B is in a Team with write permissions for issues (and everything else)

When I do an sudo upload for user B i get the error:

user should have permission to write issue

But the user has the permission. When I login as user B and do it via the web interface everything works fine.

It only works via API when I give the team admin access.

Gitea Version

1.20.0+dev-919-gf9cfd6ce5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

MySQL

Originally created by @hakito on GitHub (May 26, 2023). ### Description I have an issue created by User A. I try to add an attachment via API for user B. User B is in a Team with write permissions for issues (and everything else) When I do an sudo upload for user B i get the error: > user should have permission to write issue But the user has the permission. When I login as user B and do it via the web interface everything works fine. It only works via API when I give the team admin access. ### Gitea Version 1.20.0+dev-919-gf9cfd6ce5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker ### Database MySQL
GiteaMirror added the issue/criticaltype/bug labels 2025-11-02 09:22:07 -06:00
Author
Owner

@lunny commented on GitHub (May 30, 2023):

Which endpoint are you using?

@lunny commented on GitHub (May 30, 2023): Which endpoint are you using?
Author
Owner

@lunny commented on GitHub (May 31, 2023):

Maybe related #25019

@lunny commented on GitHub (May 31, 2023): Maybe related #25019
Author
Owner

@hakito commented on GitHub (Jun 5, 2023):

The endpoint is: POST /repos/{owner}/{repo}/issues/{index}/assets

@hakito commented on GitHub (Jun 5, 2023): The endpoint is: POST `/repos/{owner}/{repo}/issues/{index}/assets`
Author
Owner

@lunny commented on GitHub (Jun 5, 2023):

The endpoint is: POST /repos/{owner}/{repo}/issues/{index}/assets

Could you update the the latest version and try it again since #24767 merged.

@lunny commented on GitHub (Jun 5, 2023): > The endpoint is: POST `/repos/{owner}/{repo}/issues/{index}/assets` Could you update the the latest version and try it again since #24767 merged.
Author
Owner

@hakito commented on GitHub (Jun 6, 2023):

No the error still occurs in Version: 1.20.0+dev-1002-g379ec1303

@hakito commented on GitHub (Jun 6, 2023): No the error still occurs in Version: 1.20.0+dev-1002-g379ec1303
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#10919