aboutsummaryrefslogtreecommitdiffstats
path: root/apps/sharebymail/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #40192 from nextcloud/feat/sharing-icon-breadJohn Molakvoæ2023-09-051-1/+8
|\
| * feat(files): add sharing icon in headerJohn Molakvoæ2023-09-021-1/+8
| | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
* | test(sharebymail): Improve testsBenjamin Gaussorgues2023-09-011-12/+24
|/ | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* sharebymail: remove ILogger and upgrade to PHP 8 syntaxBenjamin Gaussorgues2023-08-301-41/+32
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Various improvements related to the recent implementation of temporary passwordsCyrille Bollu2022-06-081-20/+15
| | | | | | | | | | | | | | | for mail shares: 1- Changes style of "forgot password?" and "Back" button 2- Adds information about share password's expiration time in the emails sent. 3- Shows password expiration time in the Share menu 4- Fixes an issue when the message "Password expires..." would be shown for non email share types (which don't have temporary passswords) 5- At share's creation, password should only be sent when it's a permanent one See also https://github.com/nextcloud/server/issues/31952 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
* Adjust settings for mail link passwordVincent Petry2022-04-141-5/+5
| | | | | | | | | Rename the settings and invert the meaning. Increase default interval to one hour. Changed the interval to be a number of seconds, to align with other setting styles. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Adds a "Request password" button to the public share authentication page for ↵Cyrille Bollu2022-04-111-4/+51
| | | | | | | | | | | | | | | | | | shares of type TYPE_EMAIL, when the "video verification" checkbox isn't checked. Users accessing non-anonymous public shares (TYPE_EMAIL shares) can now request a temporary password themselves. - Creates a migration step for the files_sharing app to add the 'password_expiration_time' attribute to the oc_shares table. - Makes share temporary passwords' expiration time configurable via a system value. - Adds a system config value to allow permanent share passwords -Fixes a typo in a comment in apps/files_sharing/src/components/SharingEntryLink.vue See https://github.com/nextcloud/server/issues/31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
* Fix types warnings from psalmCarl Schwan2022-01-121-0/+4
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add check before sending email that email address is validCarl Schwan2022-01-111-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Allow to pass note when creating a share and send it with directly in the ↵Julius Härtl2021-12-031-0/+101
| | | | | | share mail when set Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Adjust testtobiasKaminsky2021-10-211-1/+9
| | | | Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
* Introduce ISecureRandom::CHAR_ALPHANUMERICJ0WI2021-07-081-1/+1
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Migrate HintException to OCPGary Kim2021-06-301-1/+1
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-042-5/+6
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Fix testsJohn Molakvoæ (skjnldsv)2021-03-222-19/+41
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add labels to mail sharesJohn Molakvoæ (skjnldsv)2021-03-221-0/+3
| | | | | | Now the email is shown on a second line if a label is set. Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Sharebymail: set expiration on creationRoeland Jago Douma2021-03-041-1/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* ReplyTo option for sharebymail Issue #24139Nicolas SIMIDE2021-01-281-0/+186
| | | | Signed-off-by: Nicolas SIMIDE <2083596+dems54@users.noreply.github.com>
* Don't leave cursors open when tests failJoas Schilling2020-11-091-10/+28
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-121-14/+13
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Generate password by password_policy appDaniel Kesselberg2020-08-111-8/+17
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix sharebymail testsRoeland Jago Douma2020-07-063-99/+13
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update share type constant usageJoas Schilling2020-06-241-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix creating a mail share with a passwordDaniel Calviño Sánchez2020-05-281-0/+98
| | | | | | | | | | 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>
* Extend mail shares unit tests to check the password and mail templateDaniel Calviño Sánchez2020-05-281-2/+23
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Update license headers for 19Christoph Wurst2020-04-292-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-102-12/+1
| | | | | | | | | | | | | | | 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>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-092-2/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-7/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-251-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Properly respect hide download on sharebymailRoeland Jago Douma2020-03-131-6/+9
| | | | | | fixes #19484 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersChristoph Wurst2019-12-053-3/+19
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Mode to modern phpunitRoeland Jago Douma2019-11-273-19/+19
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix more testsRoeland Jago Douma2019-11-271-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-273-5/+5
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Some php-cs fixesRoeland Jago Douma2019-11-222-2/+0
| | | | | | | | | | | * 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>
* Unshare from mail activity is missingJoas Schilling2018-12-041-1/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* OCA\ShareByMail\Capabilities unit testMasterOfDeath2018-10-311-0/+51
| | | | | | OCA\ShareByMail\Capabilities unit test Signed-off-by: Rinat Gumirov <rinat.gumirov@mail.ru>
* Honour "sendPasswordByTalk" property in mail sharesDaniel Calviño Sánchez2018-07-241-0/+156
| | | | | | | | | | | | | | | | | 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>
* Store "sendPasswordByTalk" property of mail shares in the databaseDaniel Calviño Sánchez2018-07-241-1/+4
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* fix unit testsBjoern Schiessle2018-07-211-7/+11
| | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Use ::class in test mocks of dav appMorris Jobke2017-10-261-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocksMorris Jobke2017-10-241-4/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Set the data from the templateJoas Schilling2017-10-181-32/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* expect call of getSlogan() exactly twiceStephan Müller2017-09-251-1/+1
| | | | | Signed-off-by: Stephan Müller <mail@stephanmueller.eu> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>