Conversation
… field Co-authored-by: erseco <1876752+erseco@users.noreply.github.com>
|
@copilot fix the translations msgid "Scope category" msgid "— No scope —" msgid "" |
Co-authored-by: erseco <1876752+erseco@users.noreply.github.com>
Added Spanish translations for all four strings in commit
Updated both Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot fix the tests |
The 2 failing E2E tests ( All unit tests I added ( |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1158db1f92
ℹ️ 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".
| * @return void | ||
| */ | ||
| public function save_scope_field( $user_id ) { | ||
| if ( ! current_user_can( 'edit_user', $user_id ) ) { |
There was a problem hiding this comment.
Restrict scope meta updates to administrators
save_scope_field() authorizes writes with current_user_can( 'edit_user', $user_id ), which allows users to edit their own profile; in practice, non-admin users can set documentate_scope_term_id on themselves and expand which documents they can see. Because this scope is used as a visibility boundary, letting users self-assign it is a privilege-escalation path for roles like editors/authors who can access profile updates.
Useful? React with 👍 / 👎.
| $query->set( | ||
| 'tax_query', | ||
| array( |
There was a problem hiding this comment.
Merge scope clause with existing tax_query
This call replaces the query's entire tax_query instead of adding the scope condition to existing taxonomy filters, so non-admin users lose other list filters (for example, selected document type/category filters on the documents screen) and get broader results than requested inside their scope. Preserve existing tax_query entries and append the scope clause with an AND relation.
Useful? React with 👍 / 👎.
includes/class-documentate-template-access.php: restrictdocumentate_doc_typetaxonomy admin screens to admins onlyincludes/class-documentate-scope-filter.php: filterdocumentate_documentlist by user's assigned scope category (including descendants) for non-adminsincludes/class-documentate-user-scope.php: add scope category field to user profilesincludes/class-documentate.phpdocumentate-es_ES.poanddocumentate.pot, recompiledocumentate-es_ES.modocument-export.spec.js,document-revisions.spec.js) confirmed as pre-existing on main branch💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.