feat: add enterprise server URL configuration#1747
Conversation
Signed-off-by: Timon Laptop <bedynek@themarmalade.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Timon Laptop <bedynek@themarmalade.com> Co-authored-by: Cursor <cursoragent@cursor.com>
3913622 to
6fe0cc6
Compare
ShGKme
left a comment
There was a problem hiding this comment.
Hi Timon,
This PR adds 2 features:
- Predefined server URL that can also be set via command line command by the user and is defined by the last used server. This is a general user feature, managed by the user that can be improved with GPO
- Enforced server URL that is not available for the end user in any way. It targets only enterprise installations and duplicates built-in setting (the build config).
Though they seem related, they are targeting different flows and areas.
Could you keep in this PR only the first feature?
I can see, your PR is generated with an AI agent. We actually plan to have this feature in the next minor release (this week), and also are working on this feature.
Could you tell us if you want to continue working on your PR and have time for it in the nearest days? Or we can take over?
To make sure we have this feature in before the release (and to not use a PR as middleware between the reviewers and an AI-agent 👀).
|
|
||
| const rawServerUrl = ref(BUILD_CONFIG.domain ?? prefilledServer) | ||
| const enforceDomain = Boolean(BUILD_CONFIG.domain && BUILD_CONFIG.enforceDomain) | ||
| let enforceDomain = Boolean(BUILD_CONFIG.domain && BUILD_CONFIG.enforceDomain) |
There was a problem hiding this comment.
This makes it a general, none-reactive but dynamic variable. Vue won't react to its change.
| */ | ||
| export function getPolicyConfig(): PolicyConfig { | ||
| if (isWindows) { | ||
| for (const key of ['HKLM\\Software\\Policies\\Nextcloud\\Talk', 'HKCU\\Software\\Policies\\Nextcloud\\Talk']) { |
There was a problem hiding this comment.
The default vendor is Nextcloud GmbH, and it can be different in a custom build.
Both the vendor name and the application name are available in the BUILD_CONFIG.
| export function getPolicyConfig(): PolicyConfig { | ||
| if (isWindows) { | ||
| for (const key of ['HKLM\\Software\\Policies\\Nextcloud\\Talk', 'HKCU\\Software\\Policies\\Nextcloud\\Talk']) { | ||
| const serverUrl = getRegistryValue(key, 'ServerUrl') |
There was a problem hiding this comment.
The current predefined server URLs value is a bit more complicated. We are using the accounts config which includes a list of the servers (for a multi account in the future) and the userids (to predefine them as well). I'd need to think a bit on how to name the config, but it would be good to support the same features we support via the existing config and the command line command.
| onMounted(async () => { | ||
| const { serverUrl, enforceServerUrl } = await window.TALK_DESKTOP.getPolicyConfig() | ||
| if (serverUrl) { | ||
| enforceDomain ||= Boolean(enforceServerUrl) | ||
| rawServerUrl.value = serverUrl | ||
| } |
There was a problem hiding this comment.
This moves the default (predefined) configuration handling from the config module to the UI. It should be on the configuration itself (the app config). Otherwise the app config used in another place has a different value.
Hi, Since I'm only in the office for a few more hours today and won't be able to test the GPO/MDM configs over the weekend, please feel free to take over the PR. I don't want to hold up your release timeline for this week. I'll pause working on this on my end. Once your changes are merged, just let me know. I will test the behavior on Monday and check if it works for us. Have a great weekend Best, |
Add enterprise policy support so IT admins can preconfigure the Nextcloud server URL via Windows GPO (HKLM/HKCU\Software\Policies\Nextcloud\Talk) or macOS MDM preferences on com.nextcloud.talk.mac. The app reads ServerUrl at startup and optionally EnforceServerUrl to prefill the login field and skip the setup window when enforcement is enabled.