Metaculus / Metaculus/metaculus

de-confuse api_access_tier meanings

Open
#4,849 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

time-sink
Dominant language
TypeScript
Stars
113
Forks
34
Avg merge
16h 34m
Merged PRs (30d)
30

Description

As of now, we have

  • User.api_access_tier which specifies a global setting effecting the api gateway to block some endpoints and filter others. Options are restricted, benchmarking, and `unrestricted.
  • UserDataAccess.api_access_tier of benchmarking or unrestricted when paired with a specific UserDataAccess.project releases some of the filtering for a few very specific endpoints.

This is confusing, and I think the solution would be to rename api_access_tier on the UserDataAccess model to something like api_detail_tier. And instead of having the same values restricted, benchmarking, and unrestricted, it should be None, cp_comparison, and (possibly) full. The behavior wouldn't change, but it would make it clearer what's going on which will make it easier for admins to handle.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the UserDataAccess model and every reference to UserDataAccess.api_access_tier. Review how its values are interpreted alongside User.api_access_tier, then confirm the intended replacement name and value mapping before making changes. Done means the naming and values clearly distinguish the project-specific access behavior without changing that behavior.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.