-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEW] WebDAV Integration (User file provider) #11679
[NEW] WebDAV Integration (User file provider) #11679
Conversation
…1679-karakayasemi-integrate-webdav
import toastr from 'toastr'; | ||
|
||
Template.accountIntegrations.onCreated(function() { | ||
this.subscribe('webdavAccounts'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since the other subscribe will always happen, there is no need to subscribe here.
@@ -653,6 +653,7 @@ Template.messageBox.onCreated(function() { | |||
this.dataReply = new ReactiveVar(''); // if user is replying to a mssg, this will contain data of the mssg being replied to | |||
this.isMessageFieldEmpty = new ReactiveVar(true); | |||
this.sendIcon = new ReactiveVar(false); | |||
RocketChat.messageBox.emit('created', this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep this? It is not being used anywhere but still there is some value.
@@ -0,0 +1 @@ | |||
RocketChat.models.WebdavAccounts = this.WebdavAccounts = new Mongo.Collection('rocketchat_webdav_accounts'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.WebdavAccounts
seems to not be used anywhere else.
// converting to file object | ||
blob.lastModified = file.lastmod; | ||
blob.name = file.basename; | ||
const text = `\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this slash can be removed
import Webdav from 'webdav'; | ||
|
||
Meteor.methods({ | ||
async addWebdavAccount(formData) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a further addition would be adding a new permission to grant webdav account creations
@@ -0,0 +1,60 @@ | |||
/* globals modal, RocketChat */ | |||
import { Tracker } from 'meteor/tracker'; | |||
Tracker.autorun(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about moving this to a "better" file? it seems hidden here on a file called messageBoxActions.js
There seems to be a problem removing the webdav account from the user side. When the user removes the account in their preferences. The account does not seem go away, also not from the file-add-menu, but when trying to use it, it gives an account error. rocketchat version 1.3.0 |
This PR implements the following features;
Closes #7791 , #9745
Things to do:
I used ownCloud and Nextcloud as test webdav servers. For testing you can use https://demo.owncloud.org with following account informations:
server url: https://demo.owncloud.org/remote.php/webdav
username: demo
password:demo
To easy test the features, add new server from here with given credentials:
File picker screen:
To remove webdav accounts, Integrations section is added to my account page.
Save an attachment to webdav