Repository navigation
Conversation
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.
2 issues found across 5 files
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/trans/views/settings.py">
<violation number="1" location="weblate/trans/views/settings.py:539">
P2: This check gates every component rename on `project.edit`, not only moves. Users with only `component.edit` can no longer change the component name, and the whole Organize form is hidden for them. The API only requires `project.edit` when the slug or category changes, and `docs/admin/access.rst` lists only slug, category, and move. Run the check only when slug, category, or project changes, for example in `ComponentRenameForm.clean` against the original `self.instance` values, and add a name-only rename test.</violation>
</file>
<file name="docs/admin/access.rst">
<violation number="1" location="docs/admin/access.rst:780">
P2: The new `rename` guard also covers `ComponentRenameForm`'s `name` field, so users without `Edit project settings` can no longer change the component's display name either. Include the component name here so the access guidance describes the full permission boundary.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
| obj = parse_path(request, path, (Component, Project, Category)) | ||
| try: | ||
| if isinstance(obj, Component): | ||
| if not request.user.has_perm("project.edit", obj.project): |
There was a problem hiding this comment.
P2: This check gates every component rename on project.edit, not only moves. Users with only component.edit can no longer change the component name, and the whole Organize form is hidden for them. The API only requires project.edit when the slug or category changes, and docs/admin/access.rst lists only slug, category, and move. Run the check only when slug, category, or project changes, for example in ComponentRenameForm.clean against the original self.instance values, and add a name-only rename test.
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/trans/views/settings.py, line 539:
<comment>This check gates every component rename on `project.edit`, not only moves. Users with only `component.edit` can no longer change the component name, and the whole Organize form is hidden for them. The API only requires `project.edit` when the slug or category changes, and `docs/admin/access.rst` lists only slug, category, and move. Run the check only when slug, category, or project changes, for example in `ComponentRenameForm.clean` against the original `self.instance` values, and add a name-only rename test.</comment>
<file context>
@@ -536,6 +536,8 @@ def rename(request: AuthenticatedHttpRequest, path):
obj = parse_path(request, path, (Component, Project, Category))
try:
if isinstance(obj, Component):
+ if not request.user.has_perm("project.edit", obj.project):
+ raise PermissionDenied
return perform_rename(ComponentRenameForm, request, obj, "component.edit")
</file context>
| repository owner with that checkout. Ordinary translation permissions do not | ||
| grant this administrative access. | ||
|
|
||
| Changing the component URL slug or category, or moving the component to |
There was a problem hiding this comment.
P2: The new rename guard also covers ComponentRenameForm's name field, so users without Edit project settings can no longer change the component's display name either. Include the component name here so the access guidance describes the full permission boundary.
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 docs/admin/access.rst, line 780:
<comment>The new `rename` guard also covers `ComponentRenameForm`'s `name` field, so users without `Edit project settings` can no longer change the component's display name either. Include the component name here so the access guidance describes the full permission boundary.</comment>
<file context>
@@ -777,6 +777,11 @@ the same project.
repository owner with that checkout. Ordinary translation permissions do not
grant this administrative access.
+ Changing the component URL slug or category, or moving the component to
+ another project, additionally requires the :guilabel:`Edit project settings`
+ permission on its current project. Moving it requires that permission on
</file context>
| Changing the component URL slug or category, or moving the component to | |
| Changing the component name or URL slug, changing its category, or moving the component to |
Apply the existing API authorization boundary to the web Organize form before a component leaves its project. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-WL5VZHNT.
Preserve name-only edits for component maintainers while requiring source and destination project management for storage path moves. Extend the regression to both cases. Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-WL5VZHNT.
0cae9cc to
c523736
Compare
Apply the existing API authorization boundary to the web Organize form before a component leaves its project.
Discovered by Anthropic’s OSS Scanner, as vulnerability ANT-2026-WL5VZHNT.