Repository navigation
Conversation
Codex Review SummaryThis 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. |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
e936873 to
d660dfb
Compare
skjnldsv
left a comment
There was a problem hiding this comment.
Thanks, nice feature and good tests! Could you drop the merge commit with a rebase on main, and use a conventional title like feat: block email domains for guest invitations?
| "version": "1.16.1", | ||
| "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.1.tgz", | ||
| "integrity": "sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==", | ||
| "version": "1.16.0", |
There was a problem hiding this comment.
This downgrades follow-redirects from 1.16.1 to 1.16.0, probably from an older local install. Please revert the lockfile, the PR doesn't need npm changes.
| } | ||
| // The server validates and de-duplicates entries, show what it stored. | ||
| try { | ||
| const { data } = await axios.get(generateUrl('apps/guests/config')) |
There was a problem hiding this comment.
Fetching the whole config again just to see what the server kept is a bit much. Could setConfig return the stored blockedDomains instead? Then you can use that directly, and an invalid domain no longer shows the error twice (once from the client check, once from this diff).
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
758255d to
2d93b9b
Compare
Add an admin setting with a list of email domains for which no guest accounts can be created. An entry blocks the domain and all of its subdomains, but not unrelated domains sharing the same suffix. The check is enforced in the guest creation API and in occ guests:add. Entries are normalised (lower-case, leading "@", "*." and dots removed) and invalid entries are dropped. Internationalized domains are compared in their punycode form, so "bücher.de" also blocks "xn--bcher-kva.de" and upper-case variants. Existing guests are not affected. Saving the settings returns the stored blocklist, so the admin UI shows exactly what the server kept. Closes nextcloud#925 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TDY7TLSfZ2zVWLDsTsnqrF Signed-off-by: Johannes B. Hartmann <mail@jbhs.de>
|
Thank you very much for the feedback! I reverted the commit to “main” as a single commit with a conventional title, reset the lock file, and ‘setConfig’ now returns the saved “blockedDomains,” which are used directly by the user interface. The extra request and the duplicate error message have now been fixed. |
🤖 AI (if applicable)
The implementation, testing, and security review were carried out with the support of Claude (Claude Code). I reviewed the changes, ran lint/build and unit tests, and manually tested the feature on Nextcloud 34, 35 and 36.
Description
This feature adds a field in the admin area that allows you to exclude specific email domains and their subdomains from creating guest accounts. This is useful, for example, to prevent guest accounts from being created for email addresses that are intended to register as full accounts or that are intended to use the Federated Share feature.
The restriction applies in the guest creation API (i.e., in the share dialog). An error message is displayed in this case. For the command
occ guests:add.The ability for an admin to convert an existing account into a guest account has been intentionally left enabled.
User Interface
Admin
User
Closes #925