Commit Graph

108 Commits

Author SHA1 Message Date
noiob f28ee36e20 Remove double space so php-cs stops complaining
Signed-off-by: Johannes Leuker <j.leuker@hosting.de>
2021-02-24 11:33:19 +01:00
John Molakvoæ 946430862e
Merge pull request #24978 from dems54/issue24139 2021-02-19 08:20:58 +01:00
Nicolas SIMIDE 69bf0c8a9e ReplyTo option for sharebymail - Issue #24139 - Little bug fix
Signed-off-by: Nicolas SIMIDE <2083596+dems54@users.noreply.github.com>
2021-01-28 15:57:29 +01:00
dems54 1427a9a361 Update apps/sharebymail/lib/Settings/SettingsManager.php
Small nitpicks

Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Nicolas SIMIDE <2083596+dems54@users.noreply.github.com>
2021-01-28 15:57:29 +01:00
dems54 0a8d9341dd Update apps/sharebymail/lib/Settings/SettingsManager.php
Small nitpicks

Co-authored-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Nicolas SIMIDE <2083596+dems54@users.noreply.github.com>
2021-01-28 15:57:29 +01:00
Nicolas SIMIDE 4ac636d252 ReplyTo option for sharebymail Issue #24139
Signed-off-by: Nicolas SIMIDE <2083596+dems54@users.noreply.github.com>
2021-01-28 15:57:29 +01:00
Morris Jobke 24d436cb60
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521)

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-11 13:14:41 +01:00
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Daniel Kesselberg 4dd507675c
Generate password by password_policy app
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-08-11 21:58:51 +02:00
Roeland Jago Douma 0bcc643d6e
Cleanup share by mail a bit
* Moved to ned IBootstrap
* Register everything via the capabilities api (So clients can use it as
  well)
  - This applies to the enforcing passwords
* Updated the sharing js code to use it
* removed app.php
* removed unused settings now
* typehints
* strict typing

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-06 09:45:08 +02:00
Joas Schilling 89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-24 16:49:16 +02:00
Daniel Calviño Sánchez e59e283cc2 Fix creating a mail share with a password
When a mail share was created with a password the given password was not
hashed, so it was not possible to open the share with that password.
Moreover, if passwords were enforced the given password was ignored and
a new one was set (although in this case it was hashed so it worked as
expected). Now the given password is properly hashed and not overriden.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-05-28 21:51:22 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +02:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Robin Appelman 606f685457
properly set 'hide_download' as integer
the database field is a smallint, not a boolean.

fixes postgresql tests

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-03-13 17:38:56 +01:00
Roeland Jago Douma 84a148aac1
Properly respect hide download on sharebymail
fixes #19484

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-03-13 09:20:32 +01:00
Christoph Wurst 6127c288e8 Fix license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-01-13 14:23:49 +01:00
exner104 5c517baf98
additional fix to #18730 #18733
regarding to advice from @kesselb
2020-01-08 10:40:52 +01:00
exner104 44eba5cdc6
Wrong email sender fix #18730
Wrong email sender in app sharebymail when sending password to owner fix #18730
2020-01-08 09:47:55 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Roeland Jago Douma 8085ca4cc4
Get all shares as iterable
Sometimes we need all shares or rather a specific subset of shares but
creating dedicated functions is a pain. This just returns an iterable
object for all shares so we can loop over them without allocating all
the memory on the system.

It should not be used by any user called code. But in an occ command or
background job it is fine IMO.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-10-30 09:45:27 +01:00
Frederic Werner b3f806a949 Change send to sent
Signed-off-by: Frederic Werner <frederic-github@werner-net.work>
2019-06-30 14:40:19 +02:00
Joas Schilling b93aa586f4
Fix wrong method call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-07 14:12:17 +01:00
Joas Schilling 9cc7efaedc
Make sure the relative path is always a string
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-07 13:44:35 +01:00
Bjoern Schiessle 53ce4a049b
improve mail subject for mails to the owner with the password
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2019-01-13 20:01:51 +01:00
Joas Schilling 11c39b6c16
Unshare from mail activity is missing
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-12-04 16:42:07 +01:00
Morris Jobke 24a2107e03
Fix a case where "password_by_talk" was not a boolean (e.g. null or "0") and actively cast it to a boolean
This was the error message that we have seen:

```
Argument 1 passed to OC\\Share20\\Share::setSendPasswordByTalk() must be of the type boolean, null given, called in apps/sharebymail/lib/ShareByMailProvider.php on line 981
```

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-10-12 17:01:54 +02:00
Joas Schilling ea21aa3f7a
Use numeric placeholders if there are multiple, so that RTL languages can operate better
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-09 14:32:14 +02:00
rubo77 a3849e60ba sharebymail: Add linebreak before password
Signed-off-by: Ruben Barkow <github@r.z11.de>
2018-10-03 11:42:12 +02:00
Daniel Calviño Sánchez d582a66bea Honour "sendPasswordByTalk" property in mail shares
When a password was set for a mail share an e-mail was sent to the
recipient with the password. Now the e-mail is no longer sent if the
password is meant to be sent by Talk.

However, before the e-mail was not sent when the share was updated but
the password was not changed. Now an e-mail is sent in that case too if
switching from a password sent by Talk to a password sent by mail.

On the other hand, when switching from a password sent by mail to a
password sent by Talk it is mandatory to change the password; otherwise
the recipient would already have access to the share without having to
call the sharer to verify her identity.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-24 13:56:29 +02:00
Daniel Calviño Sánchez dd0c5e297e Store "sendPasswordByTalk" property of mail shares in the database
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-24 13:56:28 +02:00
Bjoern Schiessle eab4d96c4c
some small template fixes
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-21 15:02:19 +02:00
Bjoern Schiessle 1ce519ad38
add direct link to the share
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-21 15:02:18 +02:00
Bjoern Schiessle a29261175d
fix mail templates
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-21 15:02:18 +02:00
Bjoern Schiessle 73b88deeb8
add note to share object when reading it from the db
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-21 15:02:18 +02:00
Bjoern Schiessle c116d116fa
improve mail template and escape html code
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-21 15:02:18 +02:00
Bjoern Schiessle a93f2a648b
allow to add a personal note to a share
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-07-21 15:02:18 +02:00
Roeland Jago Douma d805959e81
Add API to undelete delete group shares
When a group share is deleted we keep track of this in the DB.
Right now it is only possible for a recipient to get back the share by
asking the sharer to delete it and to share it again. This doesn't
scale.

This endpoint makes it possible to get back the share.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-07-05 12:43:56 +02:00
Arthur Schiwon 38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-04-26 10:45:52 +02:00
Joas Schilling 339e320064
Fix existing usages
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-02-15 12:18:51 +01:00
Morris Jobke eb51f06a3b
Use ::class statement instead of string
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-29 12:03:47 +01:00
Morris Jobke 4dbee99b7b
Remove useless return statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-25 22:50:40 +01:00
Morris Jobke 2a38605545
Properly log the full exception instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-23 10:57:21 +01:00