{"record":{"id":"e838345f531c116f","repo":"RocketChat/Rocket.Chat","slug":"error-not-allowed-e83834","errorCode":"error-not-allowed","errorMessage":"WebDAV Integration Not Allowed","messagePattern":"WebDAV Integration Not Allowed","errorType":"error_code","errorClass":"MeteorError","httpStatus":null,"severity":"error","filePath":"apps/meteor/server/bridges/webdav/methods/uploadFileToWebdav.ts","lineNumber":33,"sourceCode":"\tinterface ServerMethods {\n\t\tuploadFileToWebdav(\n\t\t\taccountId: IWebdavAccount['_id'],\n\t\t\tfileData: string | Buffer | ArrayBuffer,\n\t\t\tname: string,\n\t\t): { success: boolean; message?: TranslationKey };\n\t}\n}\n\nMeteor.methods<ServerMethods>({\n\tasync uploadFileToWebdav(accountId, fileData, name) {\n\t\tif (!Meteor.userId()) {\n\t\t\tthrow new MeteorError('error-invalid-user', 'Invalid User', {\n\t\t\t\tmethod: 'uploadFileToWebdav',\n\t\t\t});\n\t\t}\n\n\t\tif (!settings.get('Webdav_Integration_Enabled')) {\n\t\t\tthrow new MeteorError('error-not-allowed', 'WebDAV Integration Not Allowed', {\n\t\t\t\tmethod: 'uploadFileToWebdav',\n\t\t\t});\n\t\t}\n\n\t\ttry {\n\t\t\tawait uploadFileToWebdav(accountId, fileData instanceof ArrayBuffer ? Buffer.from(fileData) : fileData, name);\n\t\t\treturn { success: true };\n\t\t} catch (err: any) {\n\t\t\tif (typeof err === 'object' && err instanceof Error && err.name === 'error-invalid-account') {\n\t\t\t\tthrow new MeteorError(err.name, 'Invalid WebDAV Account', {\n\t\t\t\t\tmethod: 'uploadFileToWebdav',\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tlogger.error({ err });\n\n\t\t\tif (err.response) {\n\t\t\t\tconst { status } = err.response;","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/server/bridges/webdav/methods/uploadFileToWebdav.ts#L15-L51","documentation":"The uploadFileToWebdav method checks only Webdav_Integration_Enabled (unlike the preview method, upload is generic WebDAV and needs no Nextcloud URL). If that setting is false, the upload is refused before any file data is touched or converted.","triggerScenarios":"Admin disabled the WebDAV integration; setting toggled while a user had an upload dialog open; fresh install where the integration was never enabled.","commonSituations":"Feature switched off during maintenance; environment drift between staging (enabled) and production (disabled); UI not reacting to the setting change.","solutions":["Enable Webdav_Integration_Enabled in Administration > WebDAV Integration","Hide the upload-to-WebDAV affordance in the client when the setting is off, so users never reach the error","Retry the upload after enabling"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// client: read the public setting before offering the action\nconst webdavEnabled = useSetting('Webdav_Integration_Enabled');\nif (!webdavEnabled) {\n  return null; // do not render upload-to-WebDAV UI\n}","typeGuard":null,"tryCatchPattern":"try {\n  await Meteor.callAsync('uploadFileToWebdav', accountId, fileBuffer, name);\n} catch (e: any) {\n  if (e?.error === 'error-not-allowed') {\n    // inform user the integration was disabled by the admin\n  }\n}","preventionTips":["Bind WebDAV UI visibility to the Webdav_Integration_Enabled setting reactively","Treat error-not-allowed as permanent for this session: do not auto-retry"],"tags":["webdav","configuration","settings","upload"],"backgroundTag":"missing-configuration","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}