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

Disabling stars does not affect API calls #33205

Open
HeCorr opened this issue Jan 10, 2025 · 4 comments · May be fixed by #33208
Open

Disabling stars does not affect API calls #33205

HeCorr opened this issue Jan 10, 2025 · 4 comments · May be fixed by #33208
Assignees
Labels
Milestone

Comments

@HeCorr
Copy link

HeCorr commented Jan 10, 2025

Description

If you disable the stars functionality with DISABLE_STARS, API calls to /repos/{owner}/{repo}/stargazers still work, as well as the other star-related endpoints.

[repository]
DISABLE_STARS = true
GET http://localhost:8080/gitea/api/v1/repos/HeCorr/test/stargazers

[
  {
    "id": 1,
    "login": "HeCorr",
    ...
  }
]

Gitea Version

39cc725

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.47.1

Operating System

Linux

How are you running Gitea?

Built from source with docker build --build-arg TAGS="bindata sqlite sqlite_unlock_notify" -t gitea . and running it within Docker.

Database

SQLite

@HeCorr
Copy link
Author

HeCorr commented Jan 10, 2025

I am attempting to fix this, please assign me.

@lunny lunny added this to the 1.23.2 milestone Jan 10, 2025
@HeCorr HeCorr linked a pull request Jan 10, 2025 that will close this issue
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jan 11, 2025

To be honest, that's a longstanding question in my mind: why we should make it able to disable everything.

For some features like "git hook" or "registration", we need to disable because it causes essential differences.

But for something like "stars", disabling it or not, does it really affect daily usage? If an option is not must, I'd like to keep code simple, to avoid making the logic more and more complex (and if the code is not covered by tests, they might break in the future and difficult to maintain)

@HeCorr
Copy link
Author

HeCorr commented Jan 11, 2025

@wxiaoguang As a Gitea instance operator I'd expect that disabling a feature would make it completely disabled, not just hide it from the UI.

I do understand your point of this not being crucial, but for some usecases such as using Gitea solely for bug tracking, where stars or watching don't make any sense, it would be annoying if your users could still use a functionality you intented to fully disable.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jan 11, 2025

I do understand your point of this not being crucial, but for some usecases such as using Gitea solely for bug tracking, where stars or watching don't make any sense, it would be annoying if your users could still use a functionality you intented to fully disable.

Why it would be "annoying" since it doesn't exist on the UI? When you use Gitea solely for bug tracking, there are still plenty of unneeded features besides "stars". If these unused features are all "annoying", I do not think it is feasible to disabled them one-by-one by a lot of new options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants