Repository navigation
feat(api): Site wide token API - #22713
Conversation
There was a problem hiding this comment.
Found 4 issues across 3 rules (3 WCAG, 1 Best Practice).
Reviewed by AccessLint, which checks every pull request for accessibility issues.
|
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53858791d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c15e69a295
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
nijel
left a comment
There was a problem hiding this comment.
With 2026.11.2 released, we can push this forward. Can you please rebase/merge on current main branch. I've posted some review feedback as well.
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
| {% load crispy_forms_tags humanize i18n icons permissions translations %} | ||
|
|
||
| {% block breadcrumbs %} | ||
| <li class="breadcrumb-item"> |
There was a problem hiding this comment.
WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.
<li> elements must be contained in a <ul>, <ol>, or <menu>.
Details
List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
| {% load crispy_forms_tags humanize i18n icons permissions translations %} | ||
|
|
||
| {% block breadcrumbs %} | ||
| <li class="breadcrumb-item"> |
There was a problem hiding this comment.
WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.
<li> elements must be contained in a <ul>, <ol>, or <menu>.
Details
List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.
|
I merged with the current |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de804a6d39
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
| {% load crispy_forms_tags humanize i18n icons permissions translations %} | ||
|
|
||
| {% block breadcrumbs %} | ||
| <li class="breadcrumb-item"> |
There was a problem hiding this comment.
WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.
<li> elements must be contained in a <ul>, <ol>, or <menu>.
Details
List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
| {% load crispy_forms_tags humanize i18n icons permissions translations %} | ||
|
|
||
| {% block breadcrumbs %} | ||
| <li class="breadcrumb-item"> |
There was a problem hiding this comment.
WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.
<li> elements must be contained in a <ul>, <ol>, or <menu>.
Details
List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
| {% load crispy_forms_tags humanize i18n icons permissions translations %} | ||
|
|
||
| {% block breadcrumbs %} | ||
| <li class="breadcrumb-item"> |
There was a problem hiding this comment.
WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.
<li> elements must be contained in a <ul>, <ol>, or <menu>.
Details
List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.
Head branch was pushed to by a user without write access
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
| {% load crispy_forms_tags humanize i18n icons permissions translations %} | ||
|
|
||
| {% block breadcrumbs %} | ||
| <li class="breadcrumb-item"> |
There was a problem hiding this comment.
WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.
<li> elements must be contained in a <ul>, <ol>, or <menu>.
Details
List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.
There was a problem hiding this comment.
1 issue found across 6 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="weblate/api/views.py">
<violation number="1" location="weblate/api/views.py:1619">
P2: This guard protects only the groups action, so `user.edit` callers can still mutate or delete a site-token user through the ordinary user endpoint. Apply the site-token restriction to every mutating `UserViewSet` action, not only group membership changes.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| def groups(self, request: Request, **kwargs): | ||
| obj = self.get_object() | ||
| self.perm_check(request, obj, write=True) | ||
| if obj.is_site_api_token_bot: |
There was a problem hiding this comment.
P2: This guard protects only the groups action, so user.edit callers can still mutate or delete a site-token user through the ordinary user endpoint. Apply the site-token restriction to every mutating UserViewSet action, not only group membership changes.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At weblate/api/views.py, line 1619:
<comment>This guard protects only the groups action, so `user.edit` callers can still mutate or delete a site-token user through the ordinary user endpoint. Apply the site-token restriction to every mutating `UserViewSet` action, not only group membership changes.</comment>
<file context>
@@ -1611,6 +1616,14 @@ def perform_update(self, serializer) -> None:
def groups(self, request: Request, **kwargs):
obj = self.get_object()
self.perm_check(request, obj, write=True)
+ if obj.is_site_api_token_bot:
+ self.permission_denied(
+ request,
</file context>
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
| {% load crispy_forms_tags humanize i18n icons permissions translations %} | ||
|
|
||
| {% block breadcrumbs %} | ||
| <li class="breadcrumb-item"> |
There was a problem hiding this comment.
WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.
<li> elements must be contained in a <ul>, <ol>, or <menu>.
Details
List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.
|
Please look at the merge conflicts. |
There was a problem hiding this comment.
Found 2 issues across 1 rule.
Reviewed by AccessLint, which checks every pull request for accessibility issues.
| {% load crispy_forms_tags humanize i18n icons permissions translations %} | ||
|
|
||
| {% block breadcrumbs %} | ||
| <li class="breadcrumb-item"> |
There was a problem hiding this comment.
WCAG 1.3.1: <li> is not contained in a <ul>, <ol>, or <menu>.
<li> elements must be contained in a <ul>, <ol>, or <menu>.
Details
List items (<li>) only have semantic meaning inside a list container (<ul>, <ol>, or <menu>). Without a list parent, screen readers will not announce 'list with N items' or allow users to skip between items using list navigation shortcuts. Wrap <li> elements in the appropriate list container — <ul> for unordered lists, <ol> for ordered/numbered lists.
fixes #19951