{"record":{"id":"3df8a321f9a6cf22","repo":"RocketChat/Rocket.Chat","slug":"error-not-allowed-3df8a3","errorCode":"error-not-allowed","errorMessage":"WebDAV Integration Not Allowed","messagePattern":"WebDAV Integration Not Allowed","errorType":"error_code","errorClass":"Meteor.Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/bridges/webdav/methods/getWebdavFileList.ts","lineNumber":26,"sourceCode":"import { WebdavClientAdapter } from '../lib/webdavClientAdapter';\n\ndeclare module '@rocket.chat/ddp-client' {\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tinterface ServerMethods {\n\t\tgetWebdavFileList(accountId: IWebdavAccount['_id'], path: string): { success: boolean; data: IWebdavNode[] };\n\t}\n}\n\nMeteor.methods<ServerMethods>({\n\tasync getWebdavFileList(accountId, path) {\n\t\tconst userId = Meteor.userId();\n\n\t\tif (!userId) {\n\t\t\tthrow new Meteor.Error('error-invalid-user', 'Invalid User', { method: 'getWebdavFileList' });\n\t\t}\n\n\t\tif (!settings.get('Webdav_Integration_Enabled')) {\n\t\t\tthrow new Meteor.Error('error-not-allowed', 'WebDAV Integration Not Allowed', {\n\t\t\t\tmethod: 'getWebdavFileList',\n\t\t\t});\n\t\t}\n\n\t\tconst account = await WebdavAccounts.findOneByIdAndUserId(accountId, userId, {});\n\t\tif (!account) {\n\t\t\tthrow new Meteor.Error('error-invalid-account', 'Invalid WebDAV Account', {\n\t\t\t\tmethod: 'getWebdavFileList',\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tconst cred = getWebdavCredentials(account);\n\t\t\tconst client = new WebdavClientAdapter(account.serverURL, cred);\n\t\t\tconst data = (await client.getDirectoryContents(path)) as IWebdavNode[];\n\t\t\treturn { success: true, data };\n\t\t} catch (error) {\n\t\t\tthrow new Meteor.Error('could-not-access-webdav', 'Could not access webdav', {","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/bridges/webdav/methods/getWebdavFileList.ts#L8-L44","documentation":"getWebdavFileList throws error-not-allowed ('WebDAV Integration Not Allowed') when the Webdav_Integration_Enabled setting is false. The toggle is checked right after the user check, so directory listing is blocked workspace-wide even for users with previously linked accounts. This mirrors the same gate used by the add-account and download methods.","triggerScenarios":"Calling getWebdavFileList while Webdav_Integration_Enabled is false or unset — the admin disabled the integration, or it was never enabled on this deployment.","commonSituations":"Opening a WebDAV file picker after the integration was turned off; environments where the setting was lost in a restore/migration; scripts running against workspaces where WebDAV is not configured.","solutions":["Enable WebDAV Integration under Admin → WebDAV Integration","Hide the WebDAV browser UI when the integration is off","Scripts should verify the setting before listing files"],"exampleFix":"// before\nawait call('getWebdavFileList', accountId, path); // throws error-not-allowed\n\n// after\nconst { value } = await (await fetch('/api/v1/settings/Webdav_Integration_Enabled', { headers })).json();\nif (value !== true) throw new Error('WebDAV Integration is disabled');\nawait call('getWebdavFileList', accountId, path);","handlingStrategy":"validation","validationCode":"const { value } = await (await fetch('/api/v1/settings/Webdav_Integration_Enabled', { headers: adminHeaders })).json();\nif (value !== true) throw new Error('WebDAV Integration is disabled');\nawait call('getWebdavFileList', accountId, path);","typeGuard":null,"tryCatchPattern":"try {\n  await Meteor.callAsync('getWebdavFileList', accountId, path);\n} catch (e) {\n  if (e.error === 'error-not-allowed') {\n    // integration off: do not mount the WebDAV browser at all\n  }\n}","preventionTips":["Feature-flag the WebDAV browser on the same setting the server checks","Check the toggle once at UI mount, not per file operation","Automation should skip listing when the setting is false"],"tags":["meteor","webdav","settings","feature-flag"],"backgroundTag":"integration-disabled","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}