Skip to content

restoring feature to send sharing link via email - #810

Merged
DeepDiver1975 merged 3 commits into
masterfrom
send-share-link-by-email
Dec 12, 2012
Merged

DeepDiver1975 merged 3 commits into
masterfrom
send-share-link-by-email

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

During rewrite of the sharing mechanism we lost the feature to send the public link via email.
This feature was often requested to be out back - e.g. #100.

Here it comes!

@MTGap @karlitschek @schiesbn @butonic @jancborchardt
Please have a look - THX!

@MTGap

MTGap commented Dec 10, 2012

Copy link
Copy Markdown
Contributor

I'm actually planning on changing the UX for sharing link via email for the next release. So, no go for this merge from me. 👎

Let me know after December 15th if you want to work on this with me.

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

It would have been great to know this in advance. One comment on #100 in the past weeks and everybody would have been happy. 

Will your solution be compatible with stable45? 

This solution is identical with stable4 and can make users happy next weeks.

Cheers

Von Samsung Mobile gesendetMichael Gapczynski [email protected] hat geschrieben:I'm actually planning on changing the UX for sharing link via email for the next release. So, no go for this merge from me.

Let me know after December 15th if you want to work on this with me.

—
Reply to this email directly or view it on GitHub.

@karlitschek

Copy link
Copy Markdown
Contributor

I think it would be great to have a solution for stable45 and also something for master as a starting point would be good. @MTGap Or do you plan to redo everything completely? I think an intermediate solution is better than nothing

@MTGap

MTGap commented Dec 10, 2012

Copy link
Copy Markdown
Contributor

Then this solution can be used, but you have to do checks that public links are possible and move the code out of files_sharing.

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@MTGap You need to be a bit more precise on 'checks that public links are possible' and 'move the code out of files_sharing' THX

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@jancborchardt I need some css magic on the input field for the email address and the send button.
Because width of the button depends on the text which is translated and button should be right aligned.

Me and CSS

THX

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

[23:23:38] Just move the code to core - THX
[23:25:32] I'd give my +1, but I unfortunately don't have time to test right now
[23:26:27] THX - I'll try to find someone to test

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

Testers needed! THX

@tanghus

tanghus commented Dec 11, 2012

Copy link
Copy Markdown
Contributor

I would love to, but I don't get any share actions in files. Will I have to merge with some other branch?

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@tanghus is the app 'files_sharing' enabled? Sometimes all apps are disabled - no idea why.

@tanghus

tanghus commented Dec 11, 2012

Copy link
Copy Markdown
Contributor

D'uh, didn't think if that. I though enabling sharing did it.
I works fine except two minor issues:

  • When you get autoselections in the input field and select it by pressing enter, mail isn't triggered, the share dropdown slides up, and there's no response to the user. As far as I could see it's browser autocomplete(?), so you should probably intercept keyCode 13, check for content, and either just send or also return false to give proper feedback.
  • Maybe hide the #shareWith input when #linkCheckboxis checked? But that's not part of this PR.

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

aha - keyboardshortcuts.js captures enter and opens the file/folder.

As this applies to all input boxes within the sharing dialog - I'd link to handle this in a new issue.

@tanghus

tanghus commented Dec 11, 2012

Copy link
Copy Markdown
Contributor

This function should probably do something like:

if(!$(event.target).is('body')) {
    return;
}

@msrex

msrex commented Dec 11, 2012

Copy link
Copy Markdown

+1 - needs better documentation about the mail server options in config.php, but works well.

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@tanghus Yes - that solves the issue. THX
Do you want to submit the PR for this?

@schiessle

Copy link
Copy Markdown
Contributor

The mail server config is a bit tricky. At the moment I don't have a working mail setup so I can't test it completely.

I tried to configure my smtp server in config.php but it seems like this doesn't work if the mail server expects a TLS/SSL connection. But this is different problem.

What I would like to add. I don't like the error popup message if ownCloud doesn't have a proper mail configuration. Is it possible to check the configuration and only show the "send by mail" option if the mail system of ownCloud is configured?

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

@schiesbn I use sendmail for testing - should work in almost any case.

About working mail configuration:
It's hard to tell/validate if a configuration is working - you basically have to send a mail to find out if it's broken.
It would be nice to have a gui for the admin to setup the mail config with a 'test connection' button.
But that's beyond the scope of this PR.

maybe we add a config parameter to enable this feature?

THX

@schiessle

Copy link
Copy Markdown
Contributor

@DeepDiver1975 I agree that a complete test of the setting and a nice admin gui is out of scope here.

For this patch I thought about something more basic, e.g. check if "mail_smtpmode" is set at all in the config. So that at least if it is obvious that it will not work the option is not displayed.

For the beginning this could be checked in a simple function in OC_Util which simply asks for the config value. Later on the function could be extended with more sophisticated checks.

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

Hmm - currently OC_Mail falls back to sendmail if nothing is configured.
In case sendmail is installed this is a valid approach.

Let me have a quick look.

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

With the underlying phpmailer class it is possible to test smtp parameter.
In case of sendmail we can check if it is available.

Because the smtp test is expensive we should not do this on every request ;-)
I'd still vote for the admin gui in a separate PR.
It can be done within the dependency app as well.

@karlitschek your opinion?

@karlitschek

Copy link
Copy Markdown
Contributor

Well a GUI would be nice. But I wouldn't say that this is the highest priority because for most setups the fallback mode should work just fine. And if someone is using a more fancy mailserver setup than editing a config file should be o.k.
So I think it depends if someone has time and the motivation to do it. ;-)

@DeepDiver1975

Copy link
Copy Markdown
Contributor Author

I'll merge that now and take care about backporting.

DeepDiver1975 added a commit that referenced this pull request Dec 12, 2012
restoring feature to send sharing link via email
@DeepDiver1975
DeepDiver1975 merged commit 8b4aad7 into master Dec 12, 2012
DeepDiver1975 added a commit that referenced this pull request Dec 12, 2012
@libasys

libasys commented Dec 13, 2012

Copy link
Copy Markdown
Contributor

I am Not really a Fan of this Solution the better Way is an overview of all Shared Files of users or Shared by link in the personal settings. So you have an overview of your Shared files. And here then the Email send Dialog. You Need only the fscache and share table of the Database to get all needed Information and by the way here you can also delete the shared rights. Look here are some Screenshots how it can work on Personal settings. https://ssl.webpack.de/demo.libasyscloud.de/widget.php?action=real&iToken=ZI5%2BKcT%2FIF5CQUeEOk2%2F%2B2UPO6EEAMULrGyHGLSctBM%3D lol this Screenshots shared from my OC Installation.

@jancborchardt

Copy link
Copy Markdown
Contributor

@libasys your comment seems to be a different topic from this pull request. It’s a good suggestion though – except that this overview of shared & public files should be in the files app, not in Personal settings. Do you want to implement it?

@libasys

libasys commented Dec 14, 2012

Copy link
Copy Markdown
Contributor

My opinion, i think this must in the core, cause only the user have the rights to share files and folders and so you have an overview of all shared files and folders. that was the right topic in the gallery under album screenshots are images how i implemented the share overview in the personal settings.

DeepDiver1975 added a commit that referenced this pull request Dec 14, 2012
@jancborchardt

Copy link
Copy Markdown
Contributor

@libasys the relevant issue is #311 (shared dir’s listing), let’s continue there. Would be cool if you can do a pull request to core, but then the shared stuff should be shown in the relevant app – content doesn’t belong in Personal settings.

@karlitschek

Copy link
Copy Markdown
Contributor

The code has to be in the sharing app because this is the place where all the other share code is. This is just a question of proper code structuring. The user-interface is a different question of course.

@libasys

libasys commented Dec 14, 2012

Copy link
Copy Markdown
Contributor

i don't understand the problems, the files_sharing app is an core app so it's easy to add here the additional settings for personal directly in the apps folder? Look some users share 10 - 20 folders for users and guest so he looses control which folders and files are shared. So it make sense you have an overview in the personal settings and in this overview i would implement the feature del shares, and send e-mail for shared links. the code keeps by the app, with all rights and settings!

@jancborchardt

Copy link
Copy Markdown
Contributor

@libasys carried discussion over to relevant issue #311.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants