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

Add /api/v1/admin/domain_allows #18668

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

ClearlyClaire
Copy link
Contributor

@ClearlyClaire ClearlyClaire commented Jun 15, 2022

  • GET /api/v1/admin/domain_allows lists allowed domains
  • GET /api/v1/admin/domain_allows/:id shows one by ID
  • DELETE /api/v1/admin/domain_allows/:id deletes a given domain from the list
    of allowed domains
  • POST /api/v1/admin/domain_allows to allow a new domain:
    if that domain is already allowed, the existing DomainAllow will be returned

Limited federation mode counterpart to #18247.

The “domain allow” terminology is awkward but it's the one we've been using internally since the feature has been created. To my knowledge, it's the first time we actually expose it to users/admins, so it might be a good time to come up with a better terminology, although I can't think of anything that would fit the “domain block” terminology.


This project was funded through the NGI0 Discovery Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825322.

- `GET /api/v1/admin/domain_allows` lists allowed domains
- `GET /api/v1/admin/domain_allows/:id` shows one by ID
- `DELETE /api/v1/admin/domain_allows/:id` deletes a given domain from the list
  of allowed domains
- `POST /api/v1/admin/domain_allows` to allow a new domain:
  if that domain is already allowed, the existing DomainAllow will be returned
@ClearlyClaire ClearlyClaire added api REST API, Streaming API, Web Push API moderation Administration and moderation tooling NLnet Funded by NLnet, see https://nlnet.nl/project/Mastodon/ labels Jun 15, 2022
@digitalcircuit
Copy link

Other than "domain allows", two potential counterparts to "domain blocks" come to mind:

  1. "domain permits" (or "permitted domains"?)
  2. "domain grants"

@ClearlyClaire
Copy link
Contributor Author

I'm not completely convinced by “domain grants” but it's better than “domain allows” in my opinion. “Allowed domains” would work, though that breaks the symmetry with “domain blocks”… but maybe that isn't really an issue?

@shleeable
Copy link
Contributor

shleeable commented Jun 16, 2022

domain_blocklist vs domain_allowlist makes more sense.

domain_peers follows the BGP terminology.

Approved. Trusted. Promoted. Accepted. vested. chosen. endorsed. permitted. supported. validated.

@ClearlyClaire
Copy link
Contributor Author

domain_blocklist vs domain_allowlist makes more sense.

The APIs for domain blocks are already /api/v1/domain_blocks/ (for user domain blocks) and /api/v1/admin/domain_blocks/ (although the latter is in main but in no release, so we could still change it I guess.

domain_peers is follows the BGP terminology.

Approved. Trusted. Promoted. Accepted. vested. chosen. endorsed. permitted. supported. validated.

You've listed adjectives but if we want to be consistent with domain_blocks it should be a noun! domain_peers and domain_approvals could kind of work.

@trwnh
Copy link
Member

trwnh commented Jun 17, 2022

domains_allowed? that would be the proper plural form

@ClearlyClaire
Copy link
Contributor Author

Well, that would be consistent with domains_blocked, not domain_blocks. I don't think domains_allowed would have an advantage over allowed_domains. I think allowed_domains is fine but it doesn't mirror domain_blocks though.

@Gargron Gargron merged commit 35588d0 into mastodon:main Jun 23, 2022
kadoshita pushed a commit to kadoshita/mastodon that referenced this pull request Nov 19, 2022
- `GET /api/v1/admin/domain_allows` lists allowed domains
- `GET /api/v1/admin/domain_allows/:id` shows one by ID
- `DELETE /api/v1/admin/domain_allows/:id` deletes a given domain from the list
  of allowed domains
- `POST /api/v1/admin/domain_allows` to allow a new domain:
  if that domain is already allowed, the existing DomainAllow will be returned
ClearlyClaire added a commit to ClearlyClaire/mastodon that referenced this pull request Jul 6, 2023
- `GET /api/v1/admin/domain_allows` lists allowed domains
- `GET /api/v1/admin/domain_allows/:id` shows one by ID
- `DELETE /api/v1/admin/domain_allows/:id` deletes a given domain from the list
  of allowed domains
- `POST /api/v1/admin/domain_allows` to allow a new domain:
  if that domain is already allowed, the existing DomainAllow will be returned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api REST API, Streaming API, Web Push API moderation Administration and moderation tooling NLnet Funded by NLnet, see https://nlnet.nl/project/Mastodon/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants