core icon indicating copy to clipboard operation
core copied to clipboard

sharing notification by email not working for never logged on users

Open ma-schmid opened this issue 11 years ago • 34 comments

Steps to reproduce

  1. have ldap connection setup
  2. share file with user (from LDAP) that has never logged on yet
  3. select notifiy by email (email address also from LDAP)

Expected behaviour

ownCloud send email to the email address, also when this person has not yet logged into ownCloud. This is important to introduce the new service all employees quickly!

Actual behaviour

ownCloud warns the share creator, that no email can be sent!

sharing-notification-for-non-active-accounts

Server configuration

Operating system: sles 12 Web server: apache 2.4 Database: Oracle Rac PHP version: 5.5.14 ownCloud version: (see ownCloud admin page) 8.0.3 Updated from an older ownCloud or fresh install: 7.0.5 The content of config/config.php:

Insert your config.php content here
(Without the database password, passwordsalt and secret)

Are you using external storage, if yes which one: local/smb/sftp/... no Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... MS AD

Client configuration

Firefox Browser:

Operating system: Win 7

There is no ownCloud log entry for the warning in in the image picture above!

ma-schmid avatar Jul 02 '15 19:07 ma-schmid

@blizzz

DeepDiver1975 avatar Jul 03 '15 12:07 DeepDiver1975

@blizzz would it be possible to have a look and let us know what you think?

bboule avatar Jul 09 '15 21:07 bboule

I have a look

blizzz avatar Jul 10 '15 10:07 blizzz

Ok, I confirmed, but when attempting to send the notification again (by unchecking and rechecking that box again) it works also without logging in. Some bad timing? Investigating.

blizzz avatar Jul 10 '15 11:07 blizzz

The update of user info is triggered by userExists check. However, when we fetch users from LDAP, they are being cached as existing, so it won't be done until the cache invalidates (and my cache TTL is short for dev purposes). The propper solution is to read all necessary values when fetching the users and storing them at that time.

There is an PR in preparation (and was a bit forgotten :cry:) that would lay the foundations to it: https://github.com/owncloud/core/pull/12943

It needs to be extended to read the attributes also on searches and set them there as well.

blizzz avatar Jul 10 '15 11:07 blizzz

@blizzz How big a change is this, and how likely to break things?

MTRichards avatar Jul 21 '15 16:07 MTRichards

@MTRichards what's already there touches 4 source files and a test one. Ca. 160 new lines, and 60 removed. So the changeset is not that big yet, but many files are included, so it's a bit more complex. This will increase with the missing bits however. Additionally, it needs to be rebased first and conflicts resolved, as the code evolved.

I would not feel to comfortable to backport it. Down to OC 8.1 at most, with enough development and testing time (i.e. not 8.1.1).

blizzz avatar Jul 21 '15 21:07 blizzz

@cmonteroluque If we can't get it back to 8.0, we need to discuss given the priority of this from @CaptionF

MTRichards avatar Jul 22 '15 16:07 MTRichards

@MTRichards @cmonteroluque Checked with prospect: Early September (so 8.1.2 ?) would be just in time! Later would be really bad.

ma-schmid avatar Jul 23 '15 12:07 ma-schmid

Ok, but 8.1 is ok then. Great. @cmonteroluque for folding into 8.1.2.

MTRichards avatar Jul 23 '15 13:07 MTRichards

Hey guys just for tracking can we assign this the needed milestone?

bboule avatar Jul 23 '15 18:07 bboule

mentioned it, but didn't apply milestone. Doh!

MTRichards avatar Jul 23 '15 18:07 MTRichards

@MTRichards thanks for adding the milestone. I only just saw the last few exchanges

ghost avatar Jul 23 '15 18:07 ghost

@blizzz The PR is still WIP and 8.1.2 is not that far away. Can I somehow help you?

MorrisJobke avatar Aug 18 '15 12:08 MorrisJobke

i squeeze it in today

blizzz avatar Aug 19 '15 11:08 blizzz

Since the ldap code diverged too much I opened a new PR – propper rebasing was not possible. It goes here: https://github.com/owncloud/core/pull/18469

blizzz avatar Aug 20 '15 23:08 blizzz

Testing/Review needed. If it is good and we get it #18469 into master, I can do the backport.

blizzz avatar Aug 25 '15 13:08 blizzz

@blackm How like is it that this will make it into 8.1.2? See https://github.com/owncloud/core/issues/17362#issuecomment-124083659 :confused:

MorrisJobke avatar Aug 26 '15 12:08 MorrisJobke

@blackm Sorry. Wrong autocomplete :disappointed: I meant @blizzz :)

MorrisJobke avatar Aug 26 '15 12:08 MorrisJobke

@MorrisJobke depends on reviews, in one week there was just one brief one, from tkaufm. no i need to rebase anyway.

blizzz avatar Aug 26 '15 12:08 blizzz