Repository navigation
feat(call): add setting to limit starting calls to specific groups - #18647
nickvergessen merged 3 commits into
Conversation
b07fc9d to
2b9a73a
Compare
|
Thanks for your PR, hopefully I will find time to review this later this week. From a quick look it seems to do 2 things:
the first part should apply also to old versions that do not have your new feature, right? |
Yes, exactly. Both issues can already occur when the host restricts who may start calls, for example when start_calls is set to “Moderators only”:
I included both fixes in this PR because I encountered these paths while testing the new group restriction. Federated attendees, anonymous guests, and email guests have no local user identity that can be checked against groups on the host. Once start_calls_groups is configured, an attempt by one of these participants to start an inactive call is therefore denied. The permission checks would still enforce the restriction without these fixes, but affected clients would receive a misleading federation error or an unstructured signaling error. The fixes therefore also make sense independently of the feature. I’m happy to move the two error-handling fixes into a separate PR if that would make backporting and review easier. This is my first contribution to Talk, so I’m happy to follow whatever process you prefer. |
|
Yeah in that case it would be better to first fix the underlying bugs so we can easily test those individually and it's less troublesome to backport them. Judging from the description and commit messages you used AI, so maybe you can ask it to extract the relevant changes |
Done - extracted the two fixes into #18664, each as its own commit (federation 403 pass-through and the structured signaling error), including the corresponding docs/call.md and OpenAPI updates. Once that PR is merged, I'll rebase this one on top and drop the fix hunks here, so it only contains the group-restriction feature. |
Adds a new app config 'start_calls_groups' (JSON array of group ids, empty by default). When set, only members of the configured groups can start a call, while everyone can still chat and join ongoing calls. This complements the existing 'start_calls' level and follows the 'start_conversations' pattern. - Config::getAllowedStartCallGroupIds() / isNotAllowedToStartCalls() - Enforced via Participant::canStartCall() so both the API enforcement (RestrictStartingCalls listener) and the clients (canStartCall room property) share the same source of truth - Admin settings UI: group multiselect next to the existing options - Deleted groups are cleaned from the setting - Talk hash includes the new config to invalidate client state Resolves nextcloud#17465 Signed-off-by: Pascal Kienast <info@pascalkienast.de> Assisted-by: ClaudeCode:claude-fable-5 Assisted-by: OpenAI Codex:GPT-5
Unit tests for Config::isNotAllowedToStartCalls() and the adjusted RestrictStartingCalls listener, plus an integration feature covering: empty config (regression), allowed group member starting, non-member being blocked, and non-member joining an ongoing call. Resolves nextcloud#17465 Signed-off-by: Pascal Kienast <info@pascalkienast.de> Assisted-by: ClaudeCode:claude-fable-5
2b9a73a to
d2ec903
Compare
|
@nickvergessen Since #18664 has now been merged, i have, as promised, rebased this PR and removed all of the underlying federation/HPB fix hunks here. The diff now only contains the group-restriction feature, its admin UI and documentation, and the corresponding tests. I also updated the PR description. |
Use IAppConfig for the group array and keep participant-level call authorization in Participant::canStartCall. Assisted-by: OpenAI Codex:GPT-5 Signed-off-by: Pascal Kienast <info@pascalkienast.de>
Antreesy
left a comment
There was a problem hiding this comment.
Checked from the frontend side, no issues so far. Thanks for the contribution!
Leaving approval to backend developers
|
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.) |
☑️ Resolves
🖼️ What does this PR do?
Adds a new admin setting "Limit starting calls to groups" (app config start_calls_groups, JSON array of group ids, empty by default).
Why this matters
As described in #17465: on instances without (or with a limited) High Performance Backend, any user starting ad-hoc calls can cause significant resource and bandwidth issues, and the only workaround today (restricting conversation creation) also takes away chat. This setting lets admins keep chat open for everyone while rolling out calling gradually to selected groups.
How it works
canStartCallroom property already drives the call button in Web/mobile — no client changes needed.GroupDeletedListener).Semantics
start_callspermission bits.🧪 How to test
POST /call/{token}returns 403.Covered by unit tests (ConfigTest, RestrictStartingCallsTest) and the integration feature callapi/limit-starting-calls.feature.
🏁 Checklist
docs/settings.mdis updatedcanStartCallroom propertyAI