Skip to content

feat: add enterprise server URL configuration#1747

Open
TimonBed wants to merge 2 commits into
nextcloud:mainfrom
TimonBed:enterprise-policy-server-url
Open

feat: add enterprise server URL configuration#1747
TimonBed wants to merge 2 commits into
nextcloud:mainfrom
TimonBed:enterprise-policy-server-url

Conversation

@TimonBed
Copy link
Copy Markdown

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.

TimonBed and others added 2 commits May 20, 2026 17:20
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>
@TimonBed TimonBed force-pushed the enterprise-policy-server-url branch from 3913622 to 6fe0cc6 Compare May 21, 2026 15:15
@jospoortvliet jospoortvliet requested a review from ShGKme May 28, 2026 08:58
Copy link
Copy Markdown
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it a general, none-reactive but dynamic variable. Vue won't react to its change.

Comment thread src/app/policy.config.ts
*/
export function getPolicyConfig(): PolicyConfig {
if (isWindows) {
for (const key of ['HKLM\\Software\\Policies\\Nextcloud\\Talk', 'HKCU\\Software\\Policies\\Nextcloud\\Talk']) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/app/policy.config.ts
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')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +47 to +52
onMounted(async () => {
const { serverUrl, enforceServerUrl } = await window.TALK_DESKTOP.getPolicyConfig()
if (serverUrl) {
enforceDomain ||= Boolean(enforceServerUrl)
rawServerUrl.value = serverUrl
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@TimonBed
Copy link
Copy Markdown
Author

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 👀).

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,
Timon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants