Skip to content
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

Allow "Direct Editing" Link Without Public Sharing #12470

Closed
gohrner opened this issue Nov 15, 2018 · 16 comments
Closed

Allow "Direct Editing" Link Without Public Sharing #12470

gohrner opened this issue Nov 15, 2018 · 16 comments
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: files

Comments

@gohrner
Copy link

gohrner commented Nov 15, 2018

(Original issue: nextcloud/richdocuments#312)

Steps to reproduce

  1. Copy "File Link" in the sidebar.
  2. Open the copied URL.

Expected behaviour

The file will be presented in editing view (at least optionally).

Actual behaviour

The file will be shown in the files list, with its sidebar opened.

In case of a public share link, this already works - opening this link will optionally ask for a password and then open the file in the Richdocuments online readonly or editor view.

Server configuration detail

Operating system: Linux 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64

Webserver: Apache/2.4.25 (Debian) (apache2handler)

Database: mysql 10.1.26

PHP version:

7.0.30-0+deb9u1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, apc, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, imap, intl, json, ldap, exif, mcrypt, mysqli, pdo_mysql, Phar, posix, readline, recode, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 13.0.7 - 13.0.7.2

Updated from an older Nextcloud/ownCloud or fresh install: installed 13.0.2

Where did you install Nextcloud from: unknown

Signing status

Array
(
)

List of activated apps
Enabled:
 - activity: 2.6.1
 - apporder: 0.5.0
 - bookmarks: 0.12.2
 - calendar: 1.6.1
 - circles: 0.14.3
 - comments: 1.3.0
 - contacts: 2.1.5
 - dav: 1.4.7
 - external: 3.0.4
 - federatedfilesharing: 1.3.1
 - federation: 1.3.0
 - files: 1.8.0
 - files_pdfviewer: 1.2.1
 - files_sharing: 1.5.0
 - files_texteditor: 2.5.1
 - files_trashbin: 1.3.0
 - files_versions: 1.6.0
 - files_videoplayer: 1.2.0
 - firstrunwizard: 2.2.1
 - gallery: 18.0.0
 - issuetemplate: 0.4.0
 - ldapcontacts: 1.1.4
 - logreader: 2.0.0
 - lookup_server_connector: 1.1.0
 - mail: 0.8.3
 - nextcloud_announcements: 1.2.0
 - notes: 2.4.2
 - notifications: 2.1.2
 - oauth2: 1.1.1
 - password_policy: 1.3.0
 - polls: 0.8.3
 - provisioning_api: 1.3.0
 - richdocuments: 3.0.5
 - serverinfo: 1.3.0
 - sharebymail: 1.3.0
 - socialsharing_email: 1.0.4
 - spreed: 3.2.6
 - survey_client: 1.1.0
 - systemtags: 1.3.0
 - tasks: 0.9.7
 - theming: 1.4.5
 - twofactor_backupcodes: 1.2.3
 - updatenotification: 1.3.0
 - user_ldap: 1.3.1
 - workflowengine: 1.3.0
Disabled:
 - admin_audit
 - encryption
 - files_external
 - user_external

Configuration (config/config.php)
{
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "nextcloud.ohrner-it.com"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "https:\/\/nextcloud.ohrner-it.com",
    "htaccess.RewriteBase": "\/",
    "dbtype": "mysql",
    "version": "13.0.7.2",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "ldapIgnoreNamingRules": false,
    "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "php",
    "mail_smtpauthtype": "LOGIN",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "theme": "",
    "loglevel": 2,
    "app.mail.accounts.default": {
        "email": "%USERID%@ohrner-it.com",
        "imapHost": "luggage.ohrner.net",
        "imapPort": 993,
        "imapUser": "%USERID%",
        "imapSslMode": "ssl",
        "smtpHost": "luggage.ohrner.net",
        "smtpPort": 465,
        "smtpUser": "%USERID%",
        "smtpSslMode": "ssl"
    },
    "auth.bruteforce.protection.enabled": true,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379
    },
    "updater.release.channel": "production"
}

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption:

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/70.0.3538.77 Chrome/70.0.3538.77 Safari/537.36

Operating system: Debian 9.6

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #12469 ([Feature] Allow Direct Editing for Regular (not public) Direct File Links), #2983 (Can't open documents from public shares using Collabora online), #11169 (Allow multiple share links), #9434 (Public Sharing), and #8266 (NC13, Cannot edit Files with Collabora in shared folders).

@gohrner
Copy link
Author

gohrner commented Jan 9, 2019

#12469 was just closed as a "duplicate" of this issue:

@juliushaertl juliushaertl referenced this issue 23 minutes ago
Closed
[Feature] Collabora: Allow Direct Editing for Regular (not public) Direct File Links #12469

It's definitely related to this issue here, but I'm not sure if it's actually a duplicate, i.e. if the feature requested in #12469 will automatically work once this feature request here has been implemented.

So to make sure the desired feature from #12469 does not get lost, I'll quote it here for reference:

Steps to reproduce
Open an ODT/ODS document shown in the files list in a new tab.

Expected behaviour
The file opens in edit view, as if I had just clicked it to open in the same tab.

Actual behaviour
The file is offered for download.

@sebastianschauenburg
Copy link

Could you please also consider tagging this as "1. to develop" and milestone "Nextcloud 17"? (just like #14593)

@kesselb

This comment has been minimized.

@RT4U
Copy link

RT4U commented Jul 13, 2019

#16377

This could help

@skjnldsv skjnldsv added this to the Nextcloud 18 milestone Aug 23, 2019
@rullzer rullzer removed this from the Nextcloud 18 milestone Dec 9, 2019
@mhow2
Copy link

mhow2 commented Apr 14, 2020

Hi @rullzer @skjnldsv , what about this issue ? Could it be tagged to a milestone again ?

@skjnldsv
Copy link
Member

Hey @mhow2 !
Not a priority right now, so no milestone
This does not mean we don't want this feature, but it is simply not on our roadmap for the near future. If somebody wants to implement this feature nevertheless we are happy to assist and help out.

@juliushaertl
Copy link
Member

juliushaertl commented Apr 24, 2020

So this is actually step 2/3 of what I described in #16067 (comment) Let's close #16067 then since this one fits the remaining tasks better:

As a general comment on the approach in #16067, I think it is only half way to how it should actually behave. The ideal solution would look like the following.

  • Opening the file (with middle mouse button click) will open it in a new tab) this is what the existing pr already does -> Modify do_action so default ctrl-click opens tab #20185
  • Opening the file in the same tab, should update the current url with &openfile=fileId, so that after a reload of the page you also end up with the editor open. e.g. index.php/apps/files/?dir=/Documents&fileid=3&editfile=11
  • When closing an editor (ending the file action) the url changes back to the file list, e.g. index.php/apps/files/?dir=/Documents&fileid=3

The first part is already done with #20185 so if you copy the link of a file row you already have a direct link to open collabora or any other file ;)

cc @azul

@juliushaertl juliushaertl changed the title [Feature] Collabora: Allow "Direct Editing" Link Without Public Sharing Allow "Direct Editing" Link Without Public Sharing Apr 24, 2020
@azul
Copy link
Contributor

azul commented Apr 30, 2020

I'll take a look at the url change today.

@azul
Copy link
Contributor

azul commented Apr 30, 2020

@juliushaertl I'm a bit unsure how to best approach this.

The files app itself updates the url when navigating to another directory. This happens by triggering an changeDirectory event in the actionHandler which triggers _onDirectoryChanged which then in turn uses OC.Util.History in _changeUrl to update the url.

So I think the url update should be handled in the Viewer apps actionHandler. However the Viewer app uses vue.js a lot more than the files app. My understanding is that the vue.js approach to url updates and history is using a router.

I'll start by adding the url update in the traditional way to the open function in the viewer app. Please let me know if i should use routes instead.

@azul
Copy link
Contributor

azul commented Apr 30, 2020

⬆️ This is a first take making use of OC.Util.History. It still lacks a handler for onpopstate.

@schniepp
Copy link

schniepp commented Jul 1, 2020

@juliushaertl : Thx very much for sharing the &openfile=fileId syntax!

I have been looking for this feature for a while. Knowing this syntax, I can at least cook my own URLs that I can share with team members, so that they can directly edit the document.

@microfx
Copy link

microfx commented Jul 2, 2020

Any update on this? Is this implemented now?

@azul
Copy link
Contributor

azul commented Jul 3, 2020

@microfx, in current master if you open a file in the viewer it will change the url to one that will also open the file in the viewer. It contains the openfile=1234 part mentioned above. You can use that to create links to that file.

I also opened a pull request to the text app to make linking to local files easier. The second comment has a screen recording, illustrating how it works. I'd be happy about feedback there.

@Djiock
Copy link

Djiock commented Aug 25, 2020

@juliushaertl : Thx very much for sharing the &openfile=fileId syntax!

I have been looking for this feature for a while. Knowing this syntax, I can at least cook my own URLs that I can share with team members, so that they can directly edit the document.

Hi ! This feature would be very useful indeed, but I can't have this "hack" to work (NC 19 and 18), does the URL must end like this : apps/files/?dir=/Directory&fileid=[fileID]&openfile=[fileID] ?

@skjnldsv
Copy link
Member

skjnldsv commented Nov 3, 2021

#28174

@skjnldsv skjnldsv closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: files
Projects
None yet
Development

Successfully merging a pull request may close this issue.