Skip to content

Admin cannot make org member visible via API #28372

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

Closed
Tomeamis opened this issue Dec 6, 2023 · 0 comments · Fixed by #28294
Closed

Admin cannot make org member visible via API #28372

Tomeamis opened this issue Dec 6, 2023 · 0 comments · Fixed by #28294
Labels
topic/api Concerns mainly the API type/bug
Milestone

Comments

@Tomeamis
Copy link
Contributor

Tomeamis commented Dec 6, 2023

Description

When using the API endpoint /orgs/{org}/public_members/{username} with the PUT or DELETE methods as an admin user, it returns error 403 with the message Cannot publicize another member. The same happens when authenticated as an owner of the organization. However, if I try to do the same action via the web API, it works. I would expect that the API would not forbid me from actions I can take without issue via the web interface.

Gitea Version

b348424

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?

The problem first occured on a binary downloaded from the official website, then confirmed on a binary self-built from the main branch.

Database

SQLite

@silverwind silverwind added the topic/api Concerns mainly the API label Mar 3, 2024
wxiaoguang added a commit that referenced this issue Apr 13, 2025
Allows admins and org owners to change org member public status.

Before, this would return `Error 403: Cannot publicize another member`
despite the fact that the same user could make the same change through
the GUI.

Fixes #28372

---------

Co-authored-by: Tomáš Ženčák <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
@lunny lunny added this to the 1.24.0 milestone Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/api Concerns mainly the API type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants