diff options
Diffstat (limited to 'apps')
75 files changed, 1178 insertions, 394 deletions
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index d5e41c3c8c5..d1eff1aeaa3 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -282,7 +282,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { return isset($this->calendarInfo['{http://owncloud.org/ns}public']); } - private function isShared() { + protected function isShared() { if (!isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) { return false; } diff --git a/apps/dav/lib/CalDAV/CalendarObject.php b/apps/dav/lib/CalDAV/CalendarObject.php index c5dc50650af..86aa2c98e8d 100644 --- a/apps/dav/lib/CalDAV/CalendarObject.php +++ b/apps/dav/lib/CalDAV/CalendarObject.php @@ -43,7 +43,7 @@ class CalendarObject extends \Sabre\CalDAV\CalendarObject { return $data; } - private function isShared() { + protected function isShared() { if (!isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) { return false; } diff --git a/apps/dav/lib/CalDAV/PublicCalendar.php b/apps/dav/lib/CalDAV/PublicCalendar.php new file mode 100644 index 00000000000..63cbdbfa118 --- /dev/null +++ b/apps/dav/lib/CalDAV/PublicCalendar.php @@ -0,0 +1,87 @@ +<?php +/** + * @copyright Copyright (c) 2017, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\CalDAV; + +use Sabre\DAV\Exception\NotFound; + +class PublicCalendar extends Calendar { + + /** + * @param string $name + * @throws NotFound + * @return PublicCalendarObject + */ + public function getChild($name) { + $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); + + if (!$obj) { + throw new NotFound('Calendar object not found'); + } + if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { + throw new NotFound('Calendar object not found'); + } + $obj['acl'] = $this->getChildACL(); + + return new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj); + } + + /** + * @return PublicCalendarObject[] + */ + public function getChildren() { + $objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']); + $children = []; + foreach ($objs as $obj) { + if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { + continue; + } + $obj['acl'] = $this->getChildACL(); + $children[] = new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj); + } + return $children; + } + + /** + * @param string[] $paths + * @return PublicCalendarObject[] + */ + public function getMultipleChildren(array $paths) { + $objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths); + $children = []; + foreach ($objs as $obj) { + if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { + continue; + } + $obj['acl'] = $this->getChildACL(); + $children[] = new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj); + } + return $children; + } + + /** + * public calendars are always shared + * @return bool + */ + protected function isShared() { + return true; + } +}
\ No newline at end of file diff --git a/apps/dav/lib/CalDAV/PublicCalendarObject.php b/apps/dav/lib/CalDAV/PublicCalendarObject.php new file mode 100644 index 00000000000..a4e33ca5ce1 --- /dev/null +++ b/apps/dav/lib/CalDAV/PublicCalendarObject.php @@ -0,0 +1,33 @@ +<?php +/** + * @copyright Copyright (c) 2017, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ +namespace OCA\DAV\CalDAV; + +class PublicCalendarObject extends CalendarObject { + + /** + * public calendars are always shared + * @return bool + */ + protected function isShared() { + return true; + } +}
\ No newline at end of file diff --git a/apps/dav/lib/CalDAV/PublicCalendarRoot.php b/apps/dav/lib/CalDAV/PublicCalendarRoot.php index 94fb7e5e4d5..20654549884 100644 --- a/apps/dav/lib/CalDAV/PublicCalendarRoot.php +++ b/apps/dav/lib/CalDAV/PublicCalendarRoot.php @@ -47,8 +47,7 @@ class PublicCalendarRoot extends Collection { */ function getChild($name) { $calendar = $this->caldavBackend->getPublicCalendar($name); - $calendar['{http://owncloud.org/ns}owner-principal'] = ''; - return new Calendar($this->caldavBackend, $calendar, $this->l10n); + return new PublicCalendar($this->caldavBackend, $calendar, $this->l10n); } /** diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index 112b2c598df..b80d510356e 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -34,7 +34,7 @@ use Test\TestCase; class CalendarTest extends TestCase { /** @var IL10N */ - private $l10n; + protected $l10n; public function setUp() { parent::setUp(); diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php index ccef0cf678b..7c424fd0dd1 100644 --- a/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php +++ b/apps/dav/tests/unit/CalDAV/PublicCalendarRootTest.php @@ -3,6 +3,7 @@ namespace OCA\DAV\Tests\unit\CalDAV; use OCA\DAV\CalDAV\Calendar; +use OCA\DAV\CalDAV\PublicCalendar; use OCA\DAV\Connector\Sabre\Principal; use OCP\IL10N; use OCA\DAV\CalDAV\CalDavBackend; @@ -103,11 +104,11 @@ class PublicCalendarRootTest extends TestCase { $this->backend->createCalendar(self::UNIT_TEST_USER, 'Example', []); $calendarInfo = $this->backend->getCalendarsForUser(self::UNIT_TEST_USER)[0]; - $calendar = new Calendar($this->backend, $calendarInfo, $this->l10n); + $calendar = new PublicCalendar($this->backend, $calendarInfo, $this->l10n); $publicUri = $calendar->setPublishStatus(true); $calendarInfo = $this->backend->getPublicCalendar($publicUri); - $calendar = new Calendar($this->backend, $calendarInfo, $this->l10n); + $calendar = new PublicCalendar($this->backend, $calendarInfo, $this->l10n); return $calendar; } diff --git a/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php b/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php new file mode 100644 index 00000000000..85a6a4c5614 --- /dev/null +++ b/apps/dav/tests/unit/CalDAV/PublicCalendarTest.php @@ -0,0 +1,153 @@ +<?php +/** + * @copyright Copyright (c) 2017, Georg Ehrke + * + * @author Georg Ehrke <oc.list@georgehrke.com> + * + * @license AGPL-3.0 + * + * This code is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License, version 3, + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License, version 3, + * along with this program. If not, see <http://www.gnu.org/licenses/> + * + */ + +namespace OCA\DAV\Tests\unit\CalDAV; + +use OCA\DAV\CalDAV\PublicCalendar; +use OCA\DAV\CalDAV\CalDavBackend; +use Sabre\VObject\Reader; + +class PublicCalendarTest extends CalendarTest { + + public function testPrivateClassification() { + + $calObject0 = ['uri' => 'event-0', 'classification' => CalDavBackend::CLASSIFICATION_PUBLIC]; + $calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL]; + $calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE]; + + /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */ + $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); + $backend->expects($this->any())->method('getCalendarObjects')->willReturn([ + $calObject0, $calObject1, $calObject2 + ]); + $backend->expects($this->any())->method('getMultipleCalendarObjects') + ->with(666, ['event-0', 'event-1', 'event-2']) + ->willReturn([ + $calObject0, $calObject1, $calObject2 + ]); + $backend->expects($this->any())->method('getCalendarObject') + ->willReturn($calObject2)->with(666, 'event-2'); + + $calendarInfo = [ + '{http://owncloud.org/ns}owner-principal' => 'user2', + 'principaluri' => 'user2', + 'id' => 666, + 'uri' => 'cal', + ]; + + $c = new PublicCalendar($backend, $calendarInfo, $this->l10n); + $children = $c->getChildren(); + $this->assertEquals(2, count($children)); + $children = $c->getMultipleChildren(['event-0', 'event-1', 'event-2']); + $this->assertEquals(2, count($children)); + + $this->assertFalse($c->childExists('event-2')); + } + + public function testConfidentialClassification() { + $start = '20160609'; + $end = '20160610'; + + $calData = <<<EOD +BEGIN:VCALENDAR +PRODID:-//ownCloud calendar v1.2.2 +BEGIN:VEVENT +CREATED:20160602T133732 +DTSTAMP:20160602T133732 +LAST-MODIFIED:20160602T133732 +UID:wej2z68l9h +SUMMARY:Test Event +LOCATION:Somewhere ... +ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;CUTYPE=INDIVIDUAL;CN=de + epdiver:MAILTO:thomas.mueller@tmit.eu +ORGANIZER;CN=deepdiver:MAILTO:thomas.mueller@tmit.eu +DESCRIPTION:maybe .... +DTSTART;TZID=Europe/Berlin;VALUE=DATE:$start +DTEND;TZID=Europe/Berlin;VALUE=DATE:$end +RRULE:FREQ=DAILY +BEGIN:VALARM +ACTION:AUDIO +TRIGGER:-PT15M +END:VALARM +END:VEVENT +BEGIN:VTIMEZONE +TZID:Europe/Berlin +BEGIN:DAYLIGHT +DTSTART:19810329T020000 +RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU +TZNAME:MESZ +TZOFFSETFROM:+0100 +TZOFFSETTO:+0200 +END:DAYLIGHT +BEGIN:STANDARD +DTSTART:19961027T030000 +RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU +TZNAME:MEZ +TZOFFSETFROM:+0200 +TZOFFSETTO:+0100 +END:STANDARD +END:VTIMEZONE +END:VCALENDAR +EOD; + + $calObject0 = ['uri' => 'event-0', 'classification' => CalDavBackend::CLASSIFICATION_PUBLIC]; + $calObject1 = ['uri' => 'event-1', 'classification' => CalDavBackend::CLASSIFICATION_CONFIDENTIAL, 'calendardata' => $calData]; + $calObject2 = ['uri' => 'event-2', 'classification' => CalDavBackend::CLASSIFICATION_PRIVATE]; + + /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */ + $backend = $this->getMockBuilder(CalDavBackend::class)->disableOriginalConstructor()->getMock(); + $backend->expects($this->any())->method('getCalendarObjects')->willReturn([ + $calObject0, $calObject1, $calObject2 + ]); + $backend->expects($this->any())->method('getMultipleCalendarObjects') + ->with(666, ['event-0', 'event-1', 'event-2']) + ->willReturn([ + $calObject0, $calObject1, $calObject2 + ]); + $backend->expects($this->any())->method('getCalendarObject') + ->willReturn($calObject1)->with(666, 'event-1'); + + $calendarInfo = [ + '{http://owncloud.org/ns}owner-principal' => 'user1', + 'principaluri' => 'user2', + 'id' => 666, + 'uri' => 'cal', + ]; + $c = new PublicCalendar($backend, $calendarInfo, $this->l10n); + + $this->assertEquals(count($c->getChildren()), 2); + + // test private event + $privateEvent = $c->getChild('event-1'); + $calData = $privateEvent->get(); + $event = Reader::read($calData); + + $this->assertEquals($start, $event->VEVENT->DTSTART->getValue()); + $this->assertEquals($end, $event->VEVENT->DTEND->getValue()); + + $this->assertEquals('Busy', $event->VEVENT->SUMMARY->getValue()); + $this->assertArrayNotHasKey('ATTENDEE', $event->VEVENT); + $this->assertArrayNotHasKey('LOCATION', $event->VEVENT); + $this->assertArrayNotHasKey('DESCRIPTION', $event->VEVENT); + $this->assertArrayNotHasKey('ORGANIZER', $event->VEVENT); + } +}
\ No newline at end of file diff --git a/apps/encryption/l10n/nl.js b/apps/encryption/l10n/nl.js index b34b26435eb..441326493e4 100644 --- a/apps/encryption/l10n/nl.js +++ b/apps/encryption/l10n/nl.js @@ -4,9 +4,9 @@ OC.L10N.register( "Missing recovery key password" : "Ontbrekende wachtwoord herstelsleutel", "Please repeat the recovery key password" : "Herhaal het herstelsleutel wachtwoord", "Repeated recovery key password does not match the provided recovery key password" : "Het herhaalde herstelsleutel wachtwoord kwam niet overeen met het eerdere herstelsleutel wachtwoord ", - "Recovery key successfully enabled" : "Herstelsleutel succesvol geactiveerd", + "Recovery key successfully enabled" : "Herstelsleutel succesvol ingeschakeld", "Could not enable recovery key. Please check your recovery key password!" : "Kon herstelsleutel niet activeren. Controleer het wachtwoord van je herstelsleutel!", - "Recovery key successfully disabled" : "Herstelsleutel succesvol gedeactiveerd", + "Recovery key successfully disabled" : "Herstelsleutel succesvol uitgeschakeld", "Could not disable recovery key. Please check your recovery key password!" : "Kon herstelsleutel niet deactiveren. Controleer het wachtwoord van je herstelsleutel!", "Missing parameters" : "Ontbrekende parameters", "Please provide the old recovery password" : "Geef het oude herstelwachtwoord op", @@ -14,7 +14,7 @@ OC.L10N.register( "Please repeat the new recovery password" : "Herhaal het nieuwe herstelwachtwoord", "Password successfully changed." : "Wachtwoord succesvol gewijzigd.", "Could not change the password. Maybe the old password was not correct." : "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.", - "Recovery Key disabled" : "Herstelsleutel gedeactiveerd", + "Recovery Key disabled" : "Herstelsleutel uitgeschakeld", "Recovery Key enabled" : "Herstelsleutel ingeschakeld", "Could not enable the recovery key, please try again or contact your administrator" : "Kon herstelsleutel niet inschakelen, probeer het opnieuw, of neem contact op met je beheerder", "Could not update the private key password." : "Kon het wachtwoord van de privésleutel niet bijwerken.", @@ -23,8 +23,8 @@ OC.L10N.register( "Private key password successfully updated." : "Privésleutel succesvol bijgewerkt.", "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Je moet je cryptosleutels van de oude versleuteling (ownCloud <= 8.0) migreren naar de nieuwe. Start 'occ encryption:migrate' of neem contact op met je beheerder", "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "Ongeldige privésleutel voor de crypto app. Werk het privésleutel wachtwoord bij in je persoonlijke instellingen om opnieuw toegang te krijgen tot je versleutelde bestanden.", - "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "Crypto app is geactiveerd, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", - "Encryption app is enabled and ready" : "Encryptie app is geactiveerd en gereed", + "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "Crypto app is ingeschakeld, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", + "Encryption app is enabled and ready" : "Encryptie app is ingeschakeld en gereed", "Bad Signature" : "Verkeerde handtekening", "Missing Signature" : "Missende ondertekening", "one-time password for server-side-encryption" : "eenmalig wachtwoord voor server-side versleuteling", @@ -35,7 +35,7 @@ OC.L10N.register( "Cheers!" : "Proficiat!", "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "Hallo daar,<br><br>de beheerder heeft server-side versleuteling ingeschakeld. Je bestanden werden versleuteld met het wachtwoord <strong>%s</strong>.<br><br>Login op de webinterface, ga naar 'basis cryptomodule' in je persoonlijke instellingen en pas je cryptowachtwoord aan door dit wachtwoord in het \"oude inlog wachtwoord\" veld in te vullen alsmede in je huidige inlogwachtwoord.<br><br>", "Default encryption module" : "Standaard cryptomodule", - "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", + "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is ingeschakeld, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", "Encrypt the home storage" : "Versleutel de eigen serveropslag", "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Het inschakelen van deze optie zorgt voor versleutelen van alle bestanden op do hoofdopslag, anders worden alleen bestanden op externe opslag versleuteld", "Enable recovery key" : "Activeer herstelsleutel", @@ -57,8 +57,8 @@ OC.L10N.register( "Update Private Key Password" : "Bijwerken wachtwoord Privésleutel", "Enable password recovery:" : "Activeren wachtwoord herstel:", "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Het activeren van deze optie maakt het mogelijk om je versleutelde bestanden te benaderen als je wachtwoord kwijt is", - "Enabled" : "Geactiveerd", - "Disabled" : "Gedeactiveerd", - "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in." + "Enabled" : "Ingeschakeld", + "Disabled" : "Uitgeschakeld", + "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is ingeschakeld, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in." }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/encryption/l10n/nl.json b/apps/encryption/l10n/nl.json index 292dd1b3cac..a8c477566f8 100644 --- a/apps/encryption/l10n/nl.json +++ b/apps/encryption/l10n/nl.json @@ -2,9 +2,9 @@ "Missing recovery key password" : "Ontbrekende wachtwoord herstelsleutel", "Please repeat the recovery key password" : "Herhaal het herstelsleutel wachtwoord", "Repeated recovery key password does not match the provided recovery key password" : "Het herhaalde herstelsleutel wachtwoord kwam niet overeen met het eerdere herstelsleutel wachtwoord ", - "Recovery key successfully enabled" : "Herstelsleutel succesvol geactiveerd", + "Recovery key successfully enabled" : "Herstelsleutel succesvol ingeschakeld", "Could not enable recovery key. Please check your recovery key password!" : "Kon herstelsleutel niet activeren. Controleer het wachtwoord van je herstelsleutel!", - "Recovery key successfully disabled" : "Herstelsleutel succesvol gedeactiveerd", + "Recovery key successfully disabled" : "Herstelsleutel succesvol uitgeschakeld", "Could not disable recovery key. Please check your recovery key password!" : "Kon herstelsleutel niet deactiveren. Controleer het wachtwoord van je herstelsleutel!", "Missing parameters" : "Ontbrekende parameters", "Please provide the old recovery password" : "Geef het oude herstelwachtwoord op", @@ -12,7 +12,7 @@ "Please repeat the new recovery password" : "Herhaal het nieuwe herstelwachtwoord", "Password successfully changed." : "Wachtwoord succesvol gewijzigd.", "Could not change the password. Maybe the old password was not correct." : "Kon wachtwoord niet wijzigen. Wellicht oude wachtwoord niet juist ingevoerd.", - "Recovery Key disabled" : "Herstelsleutel gedeactiveerd", + "Recovery Key disabled" : "Herstelsleutel uitgeschakeld", "Recovery Key enabled" : "Herstelsleutel ingeschakeld", "Could not enable the recovery key, please try again or contact your administrator" : "Kon herstelsleutel niet inschakelen, probeer het opnieuw, of neem contact op met je beheerder", "Could not update the private key password." : "Kon het wachtwoord van de privésleutel niet bijwerken.", @@ -21,8 +21,8 @@ "Private key password successfully updated." : "Privésleutel succesvol bijgewerkt.", "You need to migrate your encryption keys from the old encryption (ownCloud <= 8.0) to the new one. Please run 'occ encryption:migrate' or contact your administrator" : "Je moet je cryptosleutels van de oude versleuteling (ownCloud <= 8.0) migreren naar de nieuwe. Start 'occ encryption:migrate' of neem contact op met je beheerder", "Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files." : "Ongeldige privésleutel voor de crypto app. Werk het privésleutel wachtwoord bij in je persoonlijke instellingen om opnieuw toegang te krijgen tot je versleutelde bestanden.", - "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "Crypto app is geactiveerd, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", - "Encryption app is enabled and ready" : "Encryptie app is geactiveerd en gereed", + "Encryption App is enabled, but your keys are not initialized. Please log-out and log-in again." : "Crypto app is ingeschakeld, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", + "Encryption app is enabled and ready" : "Encryptie app is ingeschakeld en gereed", "Bad Signature" : "Verkeerde handtekening", "Missing Signature" : "Missende ondertekening", "one-time password for server-side-encryption" : "eenmalig wachtwoord voor server-side versleuteling", @@ -33,7 +33,7 @@ "Cheers!" : "Proficiat!", "Hey there,<br><br>the admin enabled server-side-encryption. Your files were encrypted using the password <strong>%s</strong>.<br><br>Please login to the web interface, go to the section \"basic encryption module\" of your personal settings and update your encryption password by entering this password into the \"old log-in password\" field and your current login-password.<br><br>" : "Hallo daar,<br><br>de beheerder heeft server-side versleuteling ingeschakeld. Je bestanden werden versleuteld met het wachtwoord <strong>%s</strong>.<br><br>Login op de webinterface, ga naar 'basis cryptomodule' in je persoonlijke instellingen en pas je cryptowachtwoord aan door dit wachtwoord in het \"oude inlog wachtwoord\" veld in te vullen alsmede in je huidige inlogwachtwoord.<br><br>", "Default encryption module" : "Standaard cryptomodule", - "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", + "Encryption app is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is ingeschakeld, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in.", "Encrypt the home storage" : "Versleutel de eigen serveropslag", "Enabling this option encrypts all files stored on the main storage, otherwise only files on external storage will be encrypted" : "Het inschakelen van deze optie zorgt voor versleutelen van alle bestanden op do hoofdopslag, anders worden alleen bestanden op externe opslag versleuteld", "Enable recovery key" : "Activeer herstelsleutel", @@ -55,8 +55,8 @@ "Update Private Key Password" : "Bijwerken wachtwoord Privésleutel", "Enable password recovery:" : "Activeren wachtwoord herstel:", "Enabling this option will allow you to reobtain access to your encrypted files in case of password loss" : "Het activeren van deze optie maakt het mogelijk om je versleutelde bestanden te benaderen als je wachtwoord kwijt is", - "Enabled" : "Geactiveerd", - "Disabled" : "Gedeactiveerd", - "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is geactiveerd, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in." + "Enabled" : "Ingeschakeld", + "Disabled" : "Uitgeschakeld", + "Encryption App is enabled but your keys are not initialized, please log-out and log-in again" : "Crypto app is ingeschakeld, maar je sleutels werden niet geïnitialiseerd. Log uit en log daarna opnieuw in." },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/federatedfilesharing/l10n/nl.js b/apps/federatedfilesharing/l10n/nl.js index 9ef9074e984..6b0ed8caab4 100644 --- a/apps/federatedfilesharing/l10n/nl.js +++ b/apps/federatedfilesharing/l10n/nl.js @@ -13,7 +13,7 @@ OC.L10N.register( "Press ⌘-C to copy." : "Druk op ⌘-C om te kopiëren.", "Press Ctrl-C to copy." : "Druk op Ctrl-C om te kopiëren.", "Invalid Federated Cloud ID" : "Ongeldige Federated Cloud ID", - "Server to server sharing is not enabled on this server" : "Server met server delen is op deze server niet geactiveerd", + "Server to server sharing is not enabled on this server" : "Server met server delen is op deze server niet ingeschakeld", "Couldn't establish a federated share." : "Kon geen gefedereerde share tot stand brengen", "Couldn't establish a federated share, maybe the password was wrong." : "Kon geen gefedereerde share tot stand brengen, misschien was het wachtwoord onjuist.", "Federated Share request was successful, you will receive a invitation. Check your notifications." : "De gefedereerde share aanvraag is geslaagd, je ontvangt een uitnodiging. Controleer je meldingen.", diff --git a/apps/federatedfilesharing/l10n/nl.json b/apps/federatedfilesharing/l10n/nl.json index 73a6b042aee..de993851166 100644 --- a/apps/federatedfilesharing/l10n/nl.json +++ b/apps/federatedfilesharing/l10n/nl.json @@ -11,7 +11,7 @@ "Press ⌘-C to copy." : "Druk op ⌘-C om te kopiëren.", "Press Ctrl-C to copy." : "Druk op Ctrl-C om te kopiëren.", "Invalid Federated Cloud ID" : "Ongeldige Federated Cloud ID", - "Server to server sharing is not enabled on this server" : "Server met server delen is op deze server niet geactiveerd", + "Server to server sharing is not enabled on this server" : "Server met server delen is op deze server niet ingeschakeld", "Couldn't establish a federated share." : "Kon geen gefedereerde share tot stand brengen", "Couldn't establish a federated share, maybe the password was wrong." : "Kon geen gefedereerde share tot stand brengen, misschien was het wachtwoord onjuist.", "Federated Share request was successful, you will receive a invitation. Check your notifications." : "De gefedereerde share aanvraag is geslaagd, je ontvangt een uitnodiging. Controleer je meldingen.", diff --git a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php index 61f87e9ec67..233395dec9f 100644 --- a/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php +++ b/apps/federatedfilesharing/tests/Controller/RequestHandlerControllerTest.php @@ -67,7 +67,7 @@ class RequestHandlerControllerTest extends TestCase { /** @var \OCA\FederatedFileSharing\AddressHandler|\PHPUnit_Framework_MockObject_MockObject */ private $addressHandler; - + /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */ private $userManager; @@ -107,7 +107,7 @@ class RequestHandlerControllerTest extends TestCase { $this->userManager = $this->getMockBuilder('OCP\IUserManager')->getMock(); $this->cloudIdManager = new CloudIdManager(); - + $this->registerHttpHelper($httpHelperMock); $this->s2s = new RequestHandlerController( @@ -384,6 +384,7 @@ class RequestHandlerControllerTest extends TestCase { 'parent' => null, 'accepted' => '0', 'expiration' => null, + 'password' => null, 'mail_send' => '0' ]; diff --git a/apps/federation/l10n/is.js b/apps/federation/l10n/is.js index 1b20d2a74e5..a2fb6474ecc 100644 --- a/apps/federation/l10n/is.js +++ b/apps/federation/l10n/is.js @@ -6,7 +6,7 @@ OC.L10N.register( "No server to federate with found" : "Enginn þjónn sem hæfur er til skýjasambands fannst", "Could not add server" : "Gat ekki bætt við þjóni", "Federation" : "Samband", - "Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrumtreystum skýjum til að skiptast á notendaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notenda við deilingu sambandssameigna.", + "Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrum treystum skýjum til að skiptast á notendaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notenda við deilingu sambandssameigna.", "Add server automatically once a federated share was created successfully" : "Bæta þjóni við sjálfkrafa, hafi tekist að búa til sambandssameign", "Trusted servers" : "Treystir þjónar", "+ Add trusted server" : "+ Bæta við treystum þjóni", diff --git a/apps/federation/l10n/is.json b/apps/federation/l10n/is.json index e02867bfaf0..4d6979b9ba9 100644 --- a/apps/federation/l10n/is.json +++ b/apps/federation/l10n/is.json @@ -4,7 +4,7 @@ "No server to federate with found" : "Enginn þjónn sem hæfur er til skýjasambands fannst", "Could not add server" : "Gat ekki bætt við þjóni", "Federation" : "Samband", - "Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrumtreystum skýjum til að skiptast á notendaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notenda við deilingu sambandssameigna.", + "Federation allows you to connect with other trusted servers to exchange the user directory. For example this will be used to auto-complete external users for federated sharing." : "Þjónasamband (federation) gerir þér kleift að tengjast öðrum treystum skýjum til að skiptast á notendaskrám. Þetta er til dæmis notað til að sjálfklára nöfn ytri notenda við deilingu sambandssameigna.", "Add server automatically once a federated share was created successfully" : "Bæta þjóni við sjálfkrafa, hafi tekist að búa til sambandssameign", "Trusted servers" : "Treystir þjónar", "+ Add trusted server" : "+ Bæta við treystum þjóni", diff --git a/apps/files/l10n/nl.js b/apps/files/l10n/nl.js index 0eb6603a1fa..498613452a3 100644 --- a/apps/files/l10n/nl.js +++ b/apps/files/l10n/nl.js @@ -73,7 +73,7 @@ OC.L10N.register( "Folder" : "Map", "New folder" : "Nieuwe map", "Upload" : "Uploaden", - "An error occurred while trying to update the tags" : "Er trad een fout op bij uw poging de markeringen bij te werken", + "An error occurred while trying to update the tags" : "Er trad een fout op bij jouw poging om de markeringen bij te werken", "Added to favorites" : "Toevoegen aan favorieten", "Removed from favorites" : "Verwijderen uit favorieten", "You added {file} to your favorites" : "Je voegde {file} toe aan favorieten", diff --git a/apps/files/l10n/nl.json b/apps/files/l10n/nl.json index e87e58b6195..43e9f670859 100644 --- a/apps/files/l10n/nl.json +++ b/apps/files/l10n/nl.json @@ -71,7 +71,7 @@ "Folder" : "Map", "New folder" : "Nieuwe map", "Upload" : "Uploaden", - "An error occurred while trying to update the tags" : "Er trad een fout op bij uw poging de markeringen bij te werken", + "An error occurred while trying to update the tags" : "Er trad een fout op bij jouw poging om de markeringen bij te werken", "Added to favorites" : "Toevoegen aan favorieten", "Removed from favorites" : "Verwijderen uit favorieten", "You added {file} to your favorites" : "Je voegde {file} toe aan favorieten", diff --git a/apps/files_external/l10n/is.js b/apps/files_external/l10n/is.js index 62176e1fabd..d75741df884 100644 --- a/apps/files_external/l10n/is.js +++ b/apps/files_external/l10n/is.js @@ -33,7 +33,7 @@ OC.L10N.register( "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Gat ekki fengið lista yfir tengipunkta Windows-netdrifa: autt svar frá þjóni", "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Sumir uppsettir tengipunktar eru ekki tengdir í skráakerfið. Smelltu á rauðu örina/örvarnar til að fá frekari upplýsingar", "Please enter the credentials for the {mount} mount" : "Settu inn auðkenni fyrir {mount} tengipunktinn", - "Username" : "Notendanafn", + "Username" : "Notandanafn", "Password" : "Lykilorð", "Credentials saved" : "Auðkenni vistuð", "Credentials saving failed" : "Vistun auðkenna tókst ekki", diff --git a/apps/files_external/l10n/is.json b/apps/files_external/l10n/is.json index d051aefa57b..c8a08e539a3 100644 --- a/apps/files_external/l10n/is.json +++ b/apps/files_external/l10n/is.json @@ -31,7 +31,7 @@ "Couldn't get the list of Windows network drive mount points: empty response from the server" : "Gat ekki fengið lista yfir tengipunkta Windows-netdrifa: autt svar frá þjóni", "Some of the configured external mount points are not connected. Please click on the red row(s) for more information" : "Sumir uppsettir tengipunktar eru ekki tengdir í skráakerfið. Smelltu á rauðu örina/örvarnar til að fá frekari upplýsingar", "Please enter the credentials for the {mount} mount" : "Settu inn auðkenni fyrir {mount} tengipunktinn", - "Username" : "Notendanafn", + "Username" : "Notandanafn", "Password" : "Lykilorð", "Credentials saved" : "Auðkenni vistuð", "Credentials saving failed" : "Vistun auðkenna tókst ekki", diff --git a/apps/files_external/l10n/nl.js b/apps/files_external/l10n/nl.js index 27579c14151..877936417a0 100644 --- a/apps/files_external/l10n/nl.js +++ b/apps/files_external/l10n/nl.js @@ -103,9 +103,9 @@ OC.L10N.register( "Service name" : "Servicenaam", "Request timeout (seconds)" : "Aanvraag time-out (seconds)", "External storages" : "Externe opslag", - "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Curl ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je systeembeheerder dit te installeren.", - "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je beheerder dit te installeren.", - "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"%s\" is niet geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw beheerder om dit te installeren.", + "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Curl ondersteuning in PHP is niet ingeschakeld of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je systeembeheerder dit te installeren.", + "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP ondersteuning in PHP is niet ingeschakeld of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je beheerder dit te installeren.", + "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"%s\" is niet geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je beheerder om dit te installeren.", "No external storage configured" : "Geen externe opslag geconfigureerd", "You can add external storages in the personal settings" : "Je kunt externe opslag toevoegen in persoonlijke instellingen", "Name" : "Naam", diff --git a/apps/files_external/l10n/nl.json b/apps/files_external/l10n/nl.json index 26eb8cfc2b4..c1140d81879 100644 --- a/apps/files_external/l10n/nl.json +++ b/apps/files_external/l10n/nl.json @@ -101,9 +101,9 @@ "Service name" : "Servicenaam", "Request timeout (seconds)" : "Aanvraag time-out (seconds)", "External storages" : "Externe opslag", - "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Curl ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je systeembeheerder dit te installeren.", - "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP ondersteuning in PHP is niet geactiveerd of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je beheerder dit te installeren.", - "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"%s\" is niet geïnstalleerd. Mounten van %s is niet mogelijk. Vraag uw beheerder om dit te installeren.", + "The cURL support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "Curl ondersteuning in PHP is niet ingeschakeld of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je systeembeheerder dit te installeren.", + "The FTP support in PHP is not enabled or installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "FTP ondersteuning in PHP is niet ingeschakeld of geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je beheerder dit te installeren.", + "\"%s\" is not installed. Mounting of %s is not possible. Please ask your system administrator to install it." : "\"%s\" is niet geïnstalleerd. Mounten van %s is niet mogelijk. Vraag je beheerder om dit te installeren.", "No external storage configured" : "Geen externe opslag geconfigureerd", "You can add external storages in the personal settings" : "Je kunt externe opslag toevoegen in persoonlijke instellingen", "Name" : "Naam", diff --git a/apps/files_sharing/appinfo/info.xml b/apps/files_sharing/appinfo/info.xml index e2a08d951ac..29a137fed0b 100644 --- a/apps/files_sharing/appinfo/info.xml +++ b/apps/files_sharing/appinfo/info.xml @@ -10,7 +10,7 @@ Turning the feature off removes shared files and folders on the server for all s <licence>AGPL</licence> <author>Michael Gapczynski, Bjoern Schiessle</author> <default_enable/> - <version>1.2.0</version> + <version>1.4.0</version> <types> <filesystem/> </types> diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php index ed0d7732b37..917cb7b6639 100644 --- a/apps/files_sharing/appinfo/update.php +++ b/apps/files_sharing/appinfo/update.php @@ -34,3 +34,8 @@ if (version_compare($installedVersion, '0.9.1', '<')) { if (version_compare($installedVersion, '1.1.1', '<')) { $m = new Migration(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig()); } + +if (version_compare($installedVersion, '1.4.0', '<')) { + $m = new Migration(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig()); + $m->addPasswordColumn(); +} diff --git a/apps/files_sharing/l10n/nl.js b/apps/files_sharing/l10n/nl.js index 28dac59985a..f846b029615 100644 --- a/apps/files_sharing/l10n/nl.js +++ b/apps/files_sharing/l10n/nl.js @@ -79,8 +79,8 @@ OC.L10N.register( "Public upload is only possible for publicly shared folders" : "Publieke upload is alleen mogelijk voor publiek gedeelde mappen", "Invalid date, date format must be YYYY-MM-DD" : "Ongeldige datum, datumnotatie moet in de vorm YYYY-MM-DD", "Sharing %s failed because the back end does not allow shares from type %s" : "Delen van %s mislukte omdat de backend het delen van type %s niet ondersteunt", - "You cannot share to a Circle if the app is not enabled" : "Je kunt niets met een cirkel delen als de app aan staat.", - "Please specify a valid circle" : "Geef een geldige circel op", + "You cannot share to a Circle if the app is not enabled" : "Je kunt niets met een Kring delen als de app niet is ingeschakeld.", + "Please specify a valid circle" : "Geef een geldige kring op", "Unknown share type" : "Onbekend type share", "Not a directory" : "Geen directory", "Could not lock path" : "Kon pad niet blokkeren", diff --git a/apps/files_sharing/l10n/nl.json b/apps/files_sharing/l10n/nl.json index 70a8ad4aa9e..4797535e6c7 100644 --- a/apps/files_sharing/l10n/nl.json +++ b/apps/files_sharing/l10n/nl.json @@ -77,8 +77,8 @@ "Public upload is only possible for publicly shared folders" : "Publieke upload is alleen mogelijk voor publiek gedeelde mappen", "Invalid date, date format must be YYYY-MM-DD" : "Ongeldige datum, datumnotatie moet in de vorm YYYY-MM-DD", "Sharing %s failed because the back end does not allow shares from type %s" : "Delen van %s mislukte omdat de backend het delen van type %s niet ondersteunt", - "You cannot share to a Circle if the app is not enabled" : "Je kunt niets met een cirkel delen als de app aan staat.", - "Please specify a valid circle" : "Geef een geldige circel op", + "You cannot share to a Circle if the app is not enabled" : "Je kunt niets met een Kring delen als de app niet is ingeschakeld.", + "Please specify a valid circle" : "Geef een geldige kring op", "Unknown share type" : "Onbekend type share", "Not a directory" : "Geen directory", "Could not lock path" : "Kon pad niet blokkeren", diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php index bfbd15c1122..ed00cdc00a6 100644 --- a/apps/files_sharing/lib/Capabilities.php +++ b/apps/files_sharing/lib/Capabilities.php @@ -21,6 +21,7 @@ */ namespace OCA\Files_Sharing; +use OCP\App\IAppManager; use OCP\Capabilities\ICapability; use \OCP\IConfig; @@ -34,8 +35,12 @@ class Capabilities implements ICapability { /** @var IConfig */ private $config; - public function __construct(IConfig $config) { + /** @var IAppManager */ + private $appManager; + + public function __construct(IConfig $config, IAppManager $appManager) { $this->config = $config; + $this->appManager = $appManager; } /** @@ -76,16 +81,33 @@ class Capabilities implements ICapability { $res['resharing'] = $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes') === 'yes'; $res['user']['send_mail'] = false; + $res['user']['expire_date']['enabled'] = true; + // deprecated in favour of 'group', but we need to keep it for now + // in order to stay compatible with older clients $res['group_sharing'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes'; + + $res['group'] = []; + $res['group']['enabled'] = $this->config->getAppValue('core', 'shareapi_allow_group_sharing', 'yes') === 'yes'; + $res['group']['expire_date']['enabled'] = true; } //Federated sharing $res['federation'] = [ 'outgoing' => $this->config->getAppValue('files_sharing', 'outgoing_server2server_share_enabled', 'yes') === 'yes', - 'incoming' => $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes' + 'incoming' => $this->config->getAppValue('files_sharing', 'incoming_server2server_share_enabled', 'yes') === 'yes', + 'expire_date' => ['enabled' => true] ]; + if ($this->appManager->isEnabledForUser('sharebymail')) { + $res['mailshare'] = [ + 'enabled' => true, + 'upload_files_drop' => ['enabled' => true], + 'password' => ['enabled' => true], + 'expire_date' => ['enabled' => true] + ]; + } + return [ 'files_sharing' => $res, ]; diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 78eef6c26bb..bc525b6ef82 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -163,6 +163,11 @@ class ShareAPIController extends OCSController { $result['file_parent'] = $node->getParent()->getId(); $result['file_target'] = $share->getTarget(); + $expiration = $share->getExpirationDate(); + if ($expiration !== null) { + $result['expiration'] = $expiration->format('Y-m-d 00:00:00'); + } + if ($share->getShareType() === \OCP\Share::SHARE_TYPE_USER) { $sharedWith = $this->userManager->get($share->getSharedWith()); $result['share_with'] = $share->getSharedWith(); @@ -179,17 +184,13 @@ class ShareAPIController extends OCSController { $result['token'] = $share->getToken(); $result['url'] = $this->urlGenerator->linkToRouteAbsolute('files_sharing.sharecontroller.showShare', ['token' => $share->getToken()]); - $expiration = $share->getExpirationDate(); - if ($expiration !== null) { - $result['expiration'] = $expiration->format('Y-m-d 00:00:00'); - } - } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_REMOTE) { $result['share_with'] = $share->getSharedWith(); $result['share_with_displayname'] = $this->getDisplayNameFromAddressBook($share->getSharedWith(), 'CLOUD'); $result['token'] = $share->getToken(); } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) { $result['share_with'] = $share->getSharedWith(); + $result['password'] = $share->getPassword(); $result['share_with_displayname'] = $this->getDisplayNameFromAddressBook($share->getSharedWith(), 'EMAIL'); $result['token'] = $share->getToken(); } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_CIRCLE) { @@ -668,13 +669,14 @@ class ShareAPIController extends OCSController { throw new OCSNotFoundException($this->l->t('Wrong share ID, share doesn\'t exist')); } + if ($permissions === null && $password === null && $publicUpload === null && $expireDate === null) { + throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given')); + } + /* * expirationdate, password and publicUpload only make sense for link shares */ if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) { - if ($permissions === null && $password === null && $publicUpload === null && $expireDate === null) { - throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given')); - } $newPermissions = null; if ($publicUpload === 'true') { @@ -740,13 +742,30 @@ class ShareAPIController extends OCSController { } } else { - // For other shares only permissions is valid. - if ($permissions === null) { - throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given')); - } else { + if ($permissions !== null) { $permissions = (int)$permissions; $share->setPermissions($permissions); } + + if ($share->getShareType() === \OCP\Share::SHARE_TYPE_EMAIL) { + if ($password === '') { + $share->setPassword(null); + } else if ($password !== null) { + $share->setPassword($password); + } + } + + if ($expireDate === '') { + $share->setExpirationDate(null); + } else if ($expireDate !== null) { + try { + $expireDate = $this->parseDate($expireDate); + } catch (\Exception $e) { + throw new OCSBadRequestException($e->getMessage()); + } + $share->setExpirationDate($expireDate); + } + } if ($permissions !== null && $share->getShareOwner() !== $this->currentUser) { diff --git a/apps/files_sharing/lib/Migration.php b/apps/files_sharing/lib/Migration.php index 605a11fd22c..49e275cbe6e 100644 --- a/apps/files_sharing/lib/Migration.php +++ b/apps/files_sharing/lib/Migration.php @@ -123,6 +123,24 @@ class Migration { $this->config->deleteAppValue('core', 'shareapi_allow_public_notification'); } + public function addPasswordColumn() { + $query = $this->connection->getQueryBuilder(); + $query + ->update('share') + ->set('password', 'share_with') + ->where($query->expr()->eq('share_type', $query->createNamedParameter(\OCP\Share::SHARE_TYPE_LINK))) + ->andWhere($query->expr()->isNotNull('share_with')); + $query->execute(); + + $clearQuery = $this->connection->getQueryBuilder(); + $clearQuery + ->update('share')->set('share_with', $clearQuery->createNamedParameter(null)) + ->where($clearQuery->expr()->eq('share_type', $clearQuery->createNamedParameter(\OCP\Share::SHARE_TYPE_LINK))); + + $clearQuery->execute(); + + } + /** * find the owner of a re-shared file/folder * diff --git a/apps/files_sharing/tests/ApiTest.php b/apps/files_sharing/tests/ApiTest.php index 540905a7dc9..046ede1f83e 100644 --- a/apps/files_sharing/tests/ApiTest.php +++ b/apps/files_sharing/tests/ApiTest.php @@ -938,36 +938,6 @@ class ApiTest extends TestCase { /** * @medium - * @depends testCreateShareUserFile - */ - public function testUpdateShareInvalidPermissions() { - $node1 = $this->userFolder->get($this->filename); - $share1 = $this->shareManager->newShare(); - $share1->setNode($node1) - ->setSharedBy(self::TEST_FILES_SHARING_API_USER1) - ->setSharedWith(self::TEST_FILES_SHARING_API_USER2) - ->setShareType(\OCP\Share::SHARE_TYPE_USER) - ->setPermissions(19); - $share1 = $this->shareManager->createShare($share1); - - $ocs = $this->createOCS(self::TEST_FILES_SHARING_API_USER1); - try { - $ocs->updateShare($share1->getId()); - $this->fail(); - } catch (OCSBadRequestException $e) { - - } - $ocs->cleanup(); - - //Permissions should not have changed! - $share1 = $this->shareManager->getShareById('ocinternal:' . $share1->getId()); - $this->assertEquals(19, $share1->getPermissions()); - - $this->shareManager->deleteShare($share1); - } - - /** - * @medium */ function testUpdateShareUpload() { $node1 = $this->userFolder->get($this->folder); diff --git a/apps/files_sharing/tests/CapabilitiesTest.php b/apps/files_sharing/tests/CapabilitiesTest.php index 3d59b1f6f34..79ac1854e40 100644 --- a/apps/files_sharing/tests/CapabilitiesTest.php +++ b/apps/files_sharing/tests/CapabilitiesTest.php @@ -25,6 +25,7 @@ namespace OCA\Files_Sharing\Tests; use OCA\Files_Sharing\Capabilities; use OCA\Files_Sharing\Tests\TestCase; +use OCP\App\IAppManager; /** * Class CapabilitiesTest @@ -46,7 +47,7 @@ class CapabilitiesTest extends \Test\TestCase { } /** - * Create a mock config object and insert the values in $map tot the getAppValue + * Create a mock config object and insert the values in $map to the getAppValue * function. Then obtain the capabilities and extract the first few * levels in the array * @@ -54,9 +55,11 @@ class CapabilitiesTest extends \Test\TestCase { * @return string[] */ private function getResults(array $map) { - $stub = $this->getMockBuilder('\OCP\IConfig')->disableOriginalConstructor()->getMock(); - $stub->method('getAppValue')->will($this->returnValueMap($map)); - $cap = new Capabilities($stub); + $config = $this->getMockBuilder('\OCP\IConfig')->disableOriginalConstructor()->getMock(); + $config->method('getAppValue')->will($this->returnValueMap($map)); + $appManager = $this->getMockBuilder(IAppManager::class)->getMock(); + $appManager->expects($this->any())->method('isEnabledForUser')->with('sharebymail')->willReturn(true); + $cap = new Capabilities($config, $appManager); $result = $this->getFilesSharingPart($cap->getCapabilities()); return $result; } diff --git a/apps/files_sharing/tests/MigrationTest.php b/apps/files_sharing/tests/MigrationTest.php index 572f64da743..708de1c0eca 100644 --- a/apps/files_sharing/tests/MigrationTest.php +++ b/apps/files_sharing/tests/MigrationTest.php @@ -28,6 +28,7 @@ namespace OCA\Files_Sharing\Tests; use OCA\Files_Sharing\Migration; +use OCP\Share; /** * Class MigrationTest @@ -87,7 +88,7 @@ class MigrationTest extends TestCase { ) ); // shared contact, shouldn't be modified - $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_CONTACT) + $query->setParameter('share_type', Share::SHARE_TYPE_CONTACT) ->setParameter('share_with', 'user1') ->setParameter('uid_owner', 'owner1') ->setParameter('uid_initiator', '') @@ -103,7 +104,7 @@ class MigrationTest extends TestCase { $query->execute() ); // shared calendar, shouldn't be modified - $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_USER) + $query->setParameter('share_type', Share::SHARE_TYPE_USER) ->setParameter('share_with', 'user1') ->setParameter('uid_owner', 'owner1') ->setParameter('uid_initiator', '') @@ -119,7 +120,7 @@ class MigrationTest extends TestCase { $query->execute() ); // single user share, shouldn't be modified - $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_USER) + $query->setParameter('share_type', Share::SHARE_TYPE_USER) ->setParameter('share_with', 'user1') ->setParameter('uid_owner', 'owner1') ->setParameter('uid_initiator', '') @@ -135,7 +136,7 @@ class MigrationTest extends TestCase { $query->execute() ); // single group share, shouldn't be modified - $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_GROUP) + $query->setParameter('share_type', Share::SHARE_TYPE_GROUP) ->setParameter('share_with', 'group1') ->setParameter('uid_owner', 'owner1') ->setParameter('uid_initiator', '') @@ -168,7 +169,7 @@ class MigrationTest extends TestCase { $query->execute() ); // first user share, shouldn't be modified - $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_USER) + $query->setParameter('share_type', Share::SHARE_TYPE_USER) ->setParameter('share_with', 'user1') ->setParameter('uid_owner', 'owner2') ->setParameter('uid_initiator', '') @@ -185,7 +186,7 @@ class MigrationTest extends TestCase { ); $parent = $query->getLastInsertId(); // first re-share, should be attached to the first user share after migration - $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_USER) + $query->setParameter('share_type', Share::SHARE_TYPE_USER) ->setParameter('share_with', 'user2') ->setParameter('uid_owner', 'user1') ->setParameter('uid_initiator', '') @@ -202,7 +203,7 @@ class MigrationTest extends TestCase { ); $parent = $query->getLastInsertId(); // second re-share, should be attached to the first user share after migration - $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_USER) + $query->setParameter('share_type', Share::SHARE_TYPE_USER) ->setParameter('share_with', 'user3') ->setParameter('uid_owner', 'user2') ->setParameter('uid_initiator', '') @@ -219,7 +220,7 @@ class MigrationTest extends TestCase { ); $parent = $query->getLastInsertId(); // third re-share, should be attached to the first user share after migration - $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_REMOTE) + $query->setParameter('share_type', Share::SHARE_TYPE_REMOTE) ->setParameter('share_with', 'user@server.com') ->setParameter('uid_owner', 'user3') ->setParameter('uid_initiator', '') @@ -236,7 +237,7 @@ class MigrationTest extends TestCase { ); // Link reshare should keep its parent - $query->setParameter('share_type', \OCP\Share::SHARE_TYPE_LINK) + $query->setParameter('share_type', Share::SHARE_TYPE_LINK) ->setParameter('share_with', null) ->setParameter('uid_owner', 'user3') ->setParameter('uid_initiator', '') @@ -317,7 +318,7 @@ class MigrationTest extends TestCase { 'stime' => $query->createParameter('stime'), ] ) - ->setParameter('share_type', \OCP\Share::SHARE_TYPE_USER) + ->setParameter('share_type', Share::SHARE_TYPE_USER) ->setParameter('share_with', 'user'.($i+1)) ->setParameter('uid_owner', 'user'.($i)) ->setParameter('uid_initiator', null) @@ -377,4 +378,63 @@ class MigrationTest extends TestCase { $this->config->getAppValue('core', 'shareapi_setting1', null) ); } + + public function testAddPasswordColumn() { + + $shareTypes = [Share::SHARE_TYPE_USER, Share::SHARE_TYPE_GROUP, Share::SHARE_TYPE_REMOTE, Share::SHARE_TYPE_EMAIL, Share::SHARE_TYPE_LINK]; + + foreach ($shareTypes as $shareType) { + + for ($i = 0; $i < 5; $i++) { + $query = $this->connection->getQueryBuilder(); + $query->insert($this->table) + ->values( + [ + 'share_type' => $query->createParameter('share_type'), + 'share_with' => $query->createParameter('share_with'), + 'uid_owner' => $query->createParameter('uid_owner'), + 'uid_initiator' => $query->createParameter('uid_initiator'), + 'parent' => $query->createParameter('parent'), + 'item_type' => $query->createParameter('item_type'), + 'item_source' => $query->createParameter('item_source'), + 'item_target' => $query->createParameter('item_target'), + 'file_source' => $query->createParameter('file_source'), + 'file_target' => $query->createParameter('file_target'), + 'permissions' => $query->createParameter('permissions'), + 'stime' => $query->createParameter('stime'), + ] + ) + ->setParameter('share_type', $shareType) + ->setParameter('share_with', 'shareWith') + ->setParameter('uid_owner', 'user' . ($i)) + ->setParameter('uid_initiator', null) + ->setParameter('parent', 0) + ->setParameter('item_type', 'file') + ->setParameter('item_source', '2') + ->setParameter('item_target', '/2') + ->setParameter('file_source', 2) + ->setParameter('file_target', '/foobar') + ->setParameter('permissions', 31) + ->setParameter('stime', time()); + + $this->assertSame(1, $query->execute()); + } + } + + $this->migration->addPasswordColumn(); + + $query = $this->connection->getQueryBuilder(); + $query->select('*')->from('share'); + $allShares = $query->execute()->fetchAll(); + + foreach ($allShares as $share) { + if ((int)$share['share_type'] === Share::SHARE_TYPE_LINK) { + $this->assertNull( $share['share_with']); + $this->assertSame('shareWith', $share['password']); + } else { + $this->assertSame('shareWith', $share['share_with']); + $this->assertNull($share['password']); + } + } + } } diff --git a/apps/files_versions/l10n/es.js b/apps/files_versions/l10n/es.js index 0649334a973..2a35aca3231 100644 --- a/apps/files_versions/l10n/es.js +++ b/apps/files_versions/l10n/es.js @@ -6,6 +6,8 @@ OC.L10N.register( "Failed to revert {file} to revision {timestamp}." : "No se ha podido revertir {archivo} a revisión {timestamp}.", "_%n byte_::_%n bytes_" : ["%n byte","%n bytes"], "Restore" : "Recuperar", + "No earlier versions available" : "No hay versiones previouses disponibles", + "More versions …" : "Más versiones ...", "No versions available" : "No hay versiones disponibles", "More versions..." : "Más versiones..." }, diff --git a/apps/files_versions/l10n/es.json b/apps/files_versions/l10n/es.json index 1141909c7bf..19b2fa5ea3b 100644 --- a/apps/files_versions/l10n/es.json +++ b/apps/files_versions/l10n/es.json @@ -4,6 +4,8 @@ "Failed to revert {file} to revision {timestamp}." : "No se ha podido revertir {archivo} a revisión {timestamp}.", "_%n byte_::_%n bytes_" : ["%n byte","%n bytes"], "Restore" : "Recuperar", + "No earlier versions available" : "No hay versiones previouses disponibles", + "More versions …" : "Más versiones ...", "No versions available" : "No hay versiones disponibles", "More versions..." : "Más versiones..." },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/files_versions/l10n/it.js b/apps/files_versions/l10n/it.js index f38639c5b4a..e7790e1765b 100644 --- a/apps/files_versions/l10n/it.js +++ b/apps/files_versions/l10n/it.js @@ -6,6 +6,8 @@ OC.L10N.register( "Failed to revert {file} to revision {timestamp}." : "Ripristino di {file} alla revisione {timestamp} non riuscito.", "_%n byte_::_%n bytes_" : ["%n byte","%n byte"], "Restore" : "Ripristina", + "No earlier versions available" : "Nessuna versione precedente disponibile", + "More versions …" : "Altre versioni...", "No versions available" : "Nessuna versione disponibile", "More versions..." : "Altre versioni..." }, diff --git a/apps/files_versions/l10n/it.json b/apps/files_versions/l10n/it.json index 125938998a4..bda521d3e7c 100644 --- a/apps/files_versions/l10n/it.json +++ b/apps/files_versions/l10n/it.json @@ -4,6 +4,8 @@ "Failed to revert {file} to revision {timestamp}." : "Ripristino di {file} alla revisione {timestamp} non riuscito.", "_%n byte_::_%n bytes_" : ["%n byte","%n byte"], "Restore" : "Ripristina", + "No earlier versions available" : "Nessuna versione precedente disponibile", + "More versions …" : "Altre versioni...", "No versions available" : "Nessuna versione disponibile", "More versions..." : "Altre versioni..." },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/provisioning_api/lib/AppInfo/Application.php b/apps/provisioning_api/lib/AppInfo/Application.php index 2d6a82e2ff9..fd03fd41e16 100644 --- a/apps/provisioning_api/lib/AppInfo/Application.php +++ b/apps/provisioning_api/lib/AppInfo/Application.php @@ -3,8 +3,11 @@ namespace OCA\Provisioning_API\AppInfo; use OC\AppFramework\Utility\SimpleContainer; +use OC\AppFramework\Utility\TimeFactory; +use OC\Settings\Mailer\NewUserMailHelper; use OCA\Provisioning_API\Middleware\ProvisioningApiMiddleware; use OCP\AppFramework\App; +use OCP\Util; class Application extends App { public function __construct(array $urlParams = array()) { @@ -13,6 +16,19 @@ class Application extends App { $container = $this->getContainer(); $server = $container->getServer(); + $container->registerService(NewUserMailHelper::class, function(SimpleContainer $c) use ($server) { + return new NewUserMailHelper( + $server->getThemingDefaults(), + $server->getURLGenerator(), + $server->getL10N('settings'), + $server->getMailer(), + $server->getSecureRandom(), + new TimeFactory(), + $server->getConfig(), + $server->getCrypto(), + Util::getDefaultEmailAddress('no-reply') + ); + }); $container->registerService('ProvisioningApiMiddleware', function(SimpleContainer $c) use ($server) { $user = $server->getUserManager()->get($c['UserId']); $isAdmin = $user !== null ? $server->getGroupManager()->isAdmin($user->getUID()) : false; diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 9155d34276b..9684c7f5656 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -30,6 +30,7 @@ namespace OCA\Provisioning_API\Controller; use OC\Accounts\AccountManager; +use OC\Settings\Mailer\NewUserMailHelper; use \OC_Helper; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\TemplateResponse; @@ -72,6 +73,8 @@ class UsersController extends OCSController { private $defaults; /** @var IFactory */ private $l10nFactory; + /** @var NewUserMailHelper */ + private $newUserMailHelper; /** * @param string $appName @@ -87,6 +90,7 @@ class UsersController extends OCSController { * @param IMailer $mailer * @param \OC_Defaults $defaults * @param IFactory $l10nFactory + * @param NewUserMailHelper $newUserMailHelper */ public function __construct($appName, IRequest $request, @@ -100,7 +104,8 @@ class UsersController extends OCSController { IURLGenerator $urlGenerator, IMailer $mailer, \OC_Defaults $defaults, - IFactory $l10nFactory) { + IFactory $l10nFactory, + NewUserMailHelper $newUserMailHelper) { parent::__construct($appName, $request); $this->userManager = $userManager; @@ -114,6 +119,7 @@ class UsersController extends OCSController { $this->mailer = $mailer; $this->defaults = $defaults; $this->l10nFactory = $l10nFactory; + $this->newUserMailHelper = $newUserMailHelper; } /** @@ -290,12 +296,12 @@ class UsersController extends OCSController { // Find the data $data['id'] = $targetUserObject->getUID(); $data['quota'] = $this->fillStorageInfo($userId); - $data['email'] = $targetUserObject->getEMailAddress(); - $data['displayname'] = $targetUserObject->getDisplayName(); - $data['phone'] = $userAccount[\OC\Accounts\AccountManager::PROPERTY_PHONE]['value']; - $data['address'] = $userAccount[\OC\Accounts\AccountManager::PROPERTY_ADDRESS]['value']; - $data['webpage'] = $userAccount[\OC\Accounts\AccountManager::PROPERTY_WEBSITE]['value']; - $data['twitter'] = $userAccount[\OC\Accounts\AccountManager::PROPERTY_TWITTER]['value']; + $data[AccountManager::PROPERTY_EMAIL] = $targetUserObject->getEMailAddress(); + $data[AccountManager::PROPERTY_DISPLAYNAME] = $targetUserObject->getDisplayName(); + $data[AccountManager::PROPERTY_PHONE] = $userAccount[AccountManager::PROPERTY_PHONE]['value']; + $data[AccountManager::PROPERTY_ADDRESS] = $userAccount[AccountManager::PROPERTY_ADDRESS]['value']; + $data[AccountManager::PROPERTY_WEBSITE] = $userAccount[AccountManager::PROPERTY_WEBSITE]['value']; + $data[AccountManager::PROPERTY_TWITTER] = $userAccount[AccountManager::PROPERTY_TWITTER]['value']; $data['groups'] = $gids; return $data; @@ -327,8 +333,13 @@ class UsersController extends OCSController { if($userId === $currentLoggedInUser->getUID()) { // Editing self (display, email) $permittedFields[] = 'display'; - $permittedFields[] = 'email'; + $permittedFields[] = AccountManager::PROPERTY_DISPLAYNAME; + $permittedFields[] = AccountManager::PROPERTY_EMAIL; $permittedFields[] = 'password'; + $permittedFields[] = AccountManager::PROPERTY_PHONE; + $permittedFields[] = AccountManager::PROPERTY_ADDRESS; + $permittedFields[] = AccountManager::PROPERTY_WEBSITE; + $permittedFields[] = AccountManager::PROPERTY_TWITTER; // If admin they can edit their own quota if($this->groupManager->isAdmin($currentLoggedInUser->getUID())) { $permittedFields[] = 'quota'; @@ -340,9 +351,14 @@ class UsersController extends OCSController { || $this->groupManager->isAdmin($currentLoggedInUser->getUID())) { // They have permissions over the user $permittedFields[] = 'display'; - $permittedFields[] = 'quota'; + $permittedFields[] = AccountManager::PROPERTY_DISPLAYNAME; + $permittedFields[] = AccountManager::PROPERTY_EMAIL; $permittedFields[] = 'password'; - $permittedFields[] = 'email'; + $permittedFields[] = AccountManager::PROPERTY_PHONE; + $permittedFields[] = AccountManager::PROPERTY_ADDRESS; + $permittedFields[] = AccountManager::PROPERTY_WEBSITE; + $permittedFields[] = AccountManager::PROPERTY_TWITTER; + $permittedFields[] = 'quota'; } else { // No rights throw new OCSException('', \OCP\API::RESPOND_UNAUTHORISED); @@ -355,6 +371,7 @@ class UsersController extends OCSController { // Process the edit switch($key) { case 'display': + case AccountManager::PROPERTY_DISPLAYNAME: $targetUser->setDisplayName($value); break; case 'quota': @@ -381,13 +398,23 @@ class UsersController extends OCSController { case 'password': $targetUser->setPassword($value); break; - case 'email': + case AccountManager::PROPERTY_EMAIL: if(filter_var($value, FILTER_VALIDATE_EMAIL)) { $targetUser->setEMailAddress($value); } else { throw new OCSException('', 102); } break; + case AccountManager::PROPERTY_PHONE: + case AccountManager::PROPERTY_ADDRESS: + case AccountManager::PROPERTY_WEBSITE: + case AccountManager::PROPERTY_TWITTER: + $userAccount = $this->accountManager->getUser($targetUser); + if ($userAccount[$key]['value'] !== $value) { + $userAccount[$key]['value'] = $value; + $this->accountManager->updateUser($targetUser, $userAccount); + } + break; default: throw new OCSException('', 103); } @@ -786,30 +813,10 @@ class UsersController extends OCSController { $l10n = $this->l10nFactory->get('settings', $lang); - // data for the mail template - $mailData = [ - 'username' => $username, - 'url' => $this->urlGenerator->getAbsoluteURL('/') - ]; - - // FIXME: set users language in email - $mail = new TemplateResponse('settings', 'email.new_user', $mailData, 'blank'); - $mailContent = $mail->render(); - - // FIXME: set users language in email - $mail = new TemplateResponse('settings', 'email.new_user_plain_text', $mailData, 'blank'); - $plainTextMailContent = $mail->render(); - - $subject = $l10n->t('Your %s account was created', [$this->defaults->getName()]); - try { - $message = $this->mailer->createMessage(); - $message->setTo([$email => $username]); - $message->setSubject($subject); - $message->setHtmlBody($mailContent); - $message->setPlainBody($plainTextMailContent); - $message->setFrom([$this->fromMailAddress => $this->defaults->getName()]); - $this->mailer->send($message); + $this->newUserMailHelper->setL10N($l10n); + $emailTemplate = $this->newUserMailHelper->generateTemplate($targetUser, false); + $this->newUserMailHelper->sendMail($targetUser, $emailTemplate); } catch(\Exception $e) { $this->logger->error("Can't send new user mail to $email: " . $e->getMessage(), array('app' => 'settings')); throw new OCSException('Sending email failed', 102); diff --git a/apps/provisioning_api/tests/Controller/UsersControllerTest.php b/apps/provisioning_api/tests/Controller/UsersControllerTest.php index b5b63319d35..24516840a7a 100644 --- a/apps/provisioning_api/tests/Controller/UsersControllerTest.php +++ b/apps/provisioning_api/tests/Controller/UsersControllerTest.php @@ -32,6 +32,8 @@ namespace OCA\Provisioning_API\Tests\Controller; use Exception; use OC\Accounts\AccountManager; use OC\Group\Manager; +use OC\Mail\IEMailTemplate; +use OC\Settings\Mailer\NewUserMailHelper; use OC\SubAdmin; use OCA\Provisioning_API\Controller\UsersController; use OCP\AppFramework\Http\DataResponse; @@ -54,39 +56,30 @@ class UsersControllerTest extends TestCase { /** @var IUserManager|PHPUnit_Framework_MockObject_MockObject */ protected $userManager; - /** @var IConfig|PHPUnit_Framework_MockObject_MockObject */ protected $config; - /** @var Manager|PHPUnit_Framework_MockObject_MockObject */ protected $groupManager; - /** @var IUserSession|PHPUnit_Framework_MockObject_MockObject */ protected $userSession; - /** @var ILogger|PHPUnit_Framework_MockObject_MockObject */ protected $logger; - /** @var UsersController|PHPUnit_Framework_MockObject_MockObject */ protected $api; - /** @var AccountManager|PHPUnit_Framework_MockObject_MockObject */ protected $accountManager; - /** @var IRequest|PHPUnit_Framework_MockObject_MockObject */ protected $request; - - /** @var IURLGenerator | PHPUnit_Framework_MockObject_MockObject */ + /** @var IURLGenerator|PHPUnit_Framework_MockObject_MockObject */ private $urlGenerator; - - /** @var IMailer | PHPUnit_Framework_MockObject_MockObject */ + /** @var IMailer|PHPUnit_Framework_MockObject_MockObject */ private $mailer; - - /** @var \OC_Defaults | PHPUnit_Framework_MockObject_MockObject */ + /** @var \OC_Defaults|PHPUnit_Framework_MockObject_MockObject */ private $defaults; - - /** @var IFactory | PHPUnit_Framework_MockObject_MockObject */ + /** @var IFactory|PHPUnit_Framework_MockObject_MockObject */ private $l10nFactory; + /** @var NewUserMailHelper|PHPUnit_Framework_MockObject_MockObject */ + private $newUserMailHelper; protected function setUp() { parent::setUp(); @@ -102,6 +95,7 @@ class UsersControllerTest extends TestCase { $this->mailer = $this->createMock(IMailer::class); $this->defaults = $this->createMock(\OC_Defaults::class); $this->l10nFactory = $this->createMock(IFactory::class); + $this->newUserMailHelper = $this->createMock(NewUserMailHelper::class); $this->api = $this->getMockBuilder(UsersController::class) ->setConstructorArgs([ @@ -117,7 +111,8 @@ class UsersControllerTest extends TestCase { $this->urlGenerator, $this->mailer, $this->defaults, - $this->l10nFactory + $this->l10nFactory, + $this->newUserMailHelper ]) ->setMethods(['fillStorageInfo']) ->getMock(); @@ -734,7 +729,7 @@ class UsersControllerTest extends TestCase { 'displayname' => 'Demo User', 'phone' => 'phone', 'address' => 'address', - 'webpage' => 'website', + 'website' => 'website', 'twitter' => 'twitter', 'groups' => ['group0', 'group1', 'group2'] ]; @@ -823,7 +818,7 @@ class UsersControllerTest extends TestCase { 'displayname' => 'Demo User', 'phone' => 'phone', 'address' => 'address', - 'webpage' => 'website', + 'website' => 'website', 'twitter' => 'twitter', 'groups' => [] ]; @@ -952,7 +947,7 @@ class UsersControllerTest extends TestCase { 'displayname' => 'Subadmin User', 'phone' => 'phone', 'address' => 'address', - 'webpage' => 'website', + 'website' => 'website', 'twitter' => 'twitter', 'groups' => [] ]; @@ -2621,7 +2616,8 @@ class UsersControllerTest extends TestCase { $this->urlGenerator, $this->mailer, $this->defaults, - $this->l10nFactory + $this->l10nFactory, + $this->newUserMailHelper ]) ->setMethods(['getUserData']) ->getMock(); @@ -2636,7 +2632,7 @@ class UsersControllerTest extends TestCase { 'displayname' => 'Demo User', 'phone' => 'phone', 'address' => 'address', - 'webpage' => 'website', + 'website' => 'website', 'twitter' => 'twitter' ] ); @@ -2648,7 +2644,7 @@ class UsersControllerTest extends TestCase { 'email' => 'demo@owncloud.org', 'phone' => 'phone', 'address' => 'address', - 'webpage' => 'website', + 'website' => 'website', 'twitter' => 'twitter', 'display-name' => 'Demo User' ]; @@ -2684,7 +2680,8 @@ class UsersControllerTest extends TestCase { $this->urlGenerator, $this->mailer, $this->defaults, - $this->l10nFactory + $this->l10nFactory, + $this->newUserMailHelper ]) ->setMethods(['getUserData']) ->getMock(); @@ -2696,7 +2693,7 @@ class UsersControllerTest extends TestCase { 'email' => 'demo@owncloud.org', 'phone' => 'phone', 'address' => 'address', - 'webpage' => 'website', + 'website' => 'website', 'twitter' => 'twitter', 'displayname' => 'Demo User' ]; @@ -2884,56 +2881,6 @@ class UsersControllerTest extends TestCase { ->expects($this->once()) ->method('getEmailAddress') ->will($this->returnValue('abc@example.org')); - $message = $this->getMockBuilder('\OC\Mail\Message') - ->disableOriginalConstructor()->getMock(); - $message - ->expects($this->at(0)) - ->method('setTo') - ->with(['abc@example.org' => 'user-id']); - $message - ->expects($this->at(1)) - ->method('setSubject') - ->with('Your account was created'); - $htmlBody = new TemplateResponse( - 'settings', - 'email.new_user', - [ - 'username' => 'user-id', - 'url' => null, - ], - 'blank' - ); - $message - ->expects($this->at(2)) - ->method('setHtmlBody') - ->with($htmlBody->render()); - $plainBody = new TemplateResponse( - 'settings', - 'email.new_user_plain_text', - [ - 'username' => 'user-id', - 'url' => null, - ], - 'blank' - ); - $message - ->expects($this->at(3)) - ->method('setPlainBody') - ->with($plainBody->render()); - $message - ->expects($this->at(4)) - ->method('setFrom') - ->with(['test@example.org' => null]); - - $this->mailer - ->expects($this->at(0)) - ->method('createMessage') - ->will($this->returnValue($message)); - $this->mailer - ->expects($this->at(1)) - ->method('send') - ->with($message); - $this->config ->expects($this->at(0)) ->method('getUserValue') @@ -2942,11 +2889,6 @@ class UsersControllerTest extends TestCase { $l10n = $this->getMockBuilder(IL10N::class) ->disableOriginalConstructor() ->getMock(); - $l10n - ->expects($this->at(0)) - ->method('t') - ->with('Your %s account was created', [null]) - ->willReturn('Your account was created'); $this->l10nFactory ->expects($this->at(0)) ->method('languageExists') @@ -2957,6 +2899,19 @@ class UsersControllerTest extends TestCase { ->method('get') ->with('settings', 'es') ->willReturn($l10n); + $emailTemplate = $this->createMock(IEMailTemplate::class); + $this->newUserMailHelper + ->expects($this->at(0)) + ->method('setL10N') + ->willReturn($l10n); + $this->newUserMailHelper + ->expects($this->at(1)) + ->method('generateTemplate') + ->willReturn($emailTemplate); + $this->newUserMailHelper + ->expects($this->at(2)) + ->method('sendMail') + ->with($targetUser, $emailTemplate); $this->api->resendWelcomeMessage('UserToGet'); } @@ -2996,56 +2951,6 @@ class UsersControllerTest extends TestCase { ->expects($this->once()) ->method('getEmailAddress') ->will($this->returnValue('abc@example.org')); - $message = $this->getMockBuilder('\OC\Mail\Message') - ->disableOriginalConstructor()->getMock(); - $message - ->expects($this->at(0)) - ->method('setTo') - ->with(['abc@example.org' => 'user-id']); - $message - ->expects($this->at(1)) - ->method('setSubject') - ->with('Your account was created'); - $htmlBody = new TemplateResponse( - 'settings', - 'email.new_user', - [ - 'username' => 'user-id', - 'url' => null, - ], - 'blank' - ); - $message - ->expects($this->at(2)) - ->method('setHtmlBody') - ->with($htmlBody->render()); - $plainBody = new TemplateResponse( - 'settings', - 'email.new_user_plain_text', - [ - 'username' => 'user-id', - 'url' => null, - ], - 'blank' - ); - $message - ->expects($this->at(3)) - ->method('setPlainBody') - ->with($plainBody->render()); - $message - ->expects($this->at(4)) - ->method('setFrom') - ->with(['test@example.org' => null]); - - $this->mailer - ->expects($this->at(0)) - ->method('createMessage') - ->will($this->returnValue($message)); - $this->mailer - ->expects($this->at(1)) - ->method('send') - ->with($message); - $this->config ->expects($this->at(0)) ->method('getUserValue') @@ -3054,11 +2959,6 @@ class UsersControllerTest extends TestCase { $l10n = $this->getMockBuilder(IL10N::class) ->disableOriginalConstructor() ->getMock(); - $l10n - ->expects($this->at(0)) - ->method('t') - ->with('Your %s account was created', [null]) - ->willReturn('Your account was created'); $this->l10nFactory ->expects($this->at(0)) ->method('languageExists') @@ -3069,6 +2969,19 @@ class UsersControllerTest extends TestCase { ->method('get') ->with('settings', 'en') ->willReturn($l10n); + $emailTemplate = $this->createMock(IEMailTemplate::class); + $this->newUserMailHelper + ->expects($this->at(0)) + ->method('setL10N') + ->willReturn($l10n); + $this->newUserMailHelper + ->expects($this->at(1)) + ->method('generateTemplate') + ->willReturn($emailTemplate); + $this->newUserMailHelper + ->expects($this->at(2)) + ->method('sendMail') + ->with($targetUser, $emailTemplate); $this->api->resendWelcomeMessage('UserToGet'); } @@ -3113,56 +3026,6 @@ class UsersControllerTest extends TestCase { ->expects($this->once()) ->method('getEmailAddress') ->will($this->returnValue('abc@example.org')); - $message = $this->getMockBuilder('\OC\Mail\Message') - ->disableOriginalConstructor()->getMock(); - $message - ->expects($this->at(0)) - ->method('setTo') - ->with(['abc@example.org' => 'user-id']); - $message - ->expects($this->at(1)) - ->method('setSubject') - ->with('Your account was created'); - $htmlBody = new TemplateResponse( - 'settings', - 'email.new_user', - [ - 'username' => 'user-id', - 'url' => null, - ], - 'blank' - ); - $message - ->expects($this->at(2)) - ->method('setHtmlBody') - ->with($htmlBody->render()); - $plainBody = new TemplateResponse( - 'settings', - 'email.new_user_plain_text', - [ - 'username' => 'user-id', - 'url' => null, - ], - 'blank' - ); - $message - ->expects($this->at(3)) - ->method('setPlainBody') - ->with($plainBody->render()); - $message - ->expects($this->at(4)) - ->method('setFrom') - ->with(['test@example.org' => null]); - - $this->mailer - ->expects($this->at(0)) - ->method('createMessage') - ->will($this->returnValue($message)); - $this->mailer - ->expects($this->at(1)) - ->method('send') - ->will($this->throwException(new \Exception())); - $this->config ->expects($this->at(0)) ->method('getUserValue') @@ -3171,11 +3034,6 @@ class UsersControllerTest extends TestCase { $l10n = $this->getMockBuilder(IL10N::class) ->disableOriginalConstructor() ->getMock(); - $l10n - ->expects($this->at(0)) - ->method('t') - ->with('Your %s account was created', [null]) - ->willReturn('Your account was created'); $this->l10nFactory ->expects($this->at(0)) ->method('languageExists') @@ -3186,6 +3044,20 @@ class UsersControllerTest extends TestCase { ->method('get') ->with('settings', 'es') ->willReturn($l10n); + $emailTemplate = $this->createMock(IEMailTemplate::class); + $this->newUserMailHelper + ->expects($this->at(0)) + ->method('setL10N') + ->willReturn($l10n); + $this->newUserMailHelper + ->expects($this->at(1)) + ->method('generateTemplate') + ->willReturn($emailTemplate); + $this->newUserMailHelper + ->expects($this->at(2)) + ->method('sendMail') + ->with($targetUser, $emailTemplate) + ->willThrowException(new \Exception()); $this->api->resendWelcomeMessage('UserToGet'); } diff --git a/apps/sharebymail/appinfo/info.xml b/apps/sharebymail/appinfo/info.xml index 5528f6158d9..ab50ef03694 100644 --- a/apps/sharebymail/appinfo/info.xml +++ b/apps/sharebymail/appinfo/info.xml @@ -5,7 +5,7 @@ <description>Share provider which allows you to share files by mail</description> <licence>AGPL</licence> <author>Bjoern Schiessle</author> - <version>1.1.0</version> + <version>1.2.0</version> <namespace>ShareByMail</namespace> <category>other</category> <dependencies> @@ -17,6 +17,10 @@ <filesystem/> </types> + <settings> + <admin>OCA\ShareByMail\Settings\Admin</admin> + </settings> + <activity> <providers> <provider>OCA\ShareByMail\Activity</provider> diff --git a/apps/sharebymail/js/settings-admin.js b/apps/sharebymail/js/settings-admin.js new file mode 100644 index 00000000000..7b431233032 --- /dev/null +++ b/apps/sharebymail/js/settings-admin.js @@ -0,0 +1,30 @@ +/** + * @copyright Copyright (c) 2017 Bjoern Schiessle <bjoern@schiessle.org> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +$(function() { + + $('#sendPasswordMail').on('change', function() { + var status = 'no'; + if ($(this).is(':checked')) { + status = 'yes'; + } + OC.AppConfig.setValue('sharebymail', 'sendpasswordmail', status); + }); + +}); diff --git a/apps/sharebymail/l10n/de.js b/apps/sharebymail/l10n/de.js index b1f90520540..4afc8207d31 100644 --- a/apps/sharebymail/l10n/de.js +++ b/apps/sharebymail/l10n/de.js @@ -14,11 +14,17 @@ OC.L10N.register( "%s shared »%s« with you" : "%s hat „%s“ mit Dir geteilt", "%s shared »%s« with you on behalf of %s" : "%s hat »%s« im Auftrag von %s mit Dir geteilt", "Failed to create the E-mail" : "Erstellen der E-Mail ist fehlgeschalgen", + "Password to access »%s« shared to you by %s" : "Das Passwort zum Zugriff auf %s wurde durch %s mit dir geteilt.", "Could not find share" : "Freigabe konnte nicht gefunden werden", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Hallo,\n\n%s hat »%s« im Auftrag von %s mit Dir geteilt.\n\n%s\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Hallo,\n\n%s hat »%s« mit Dir geteilt.\n\n%s\n", "Cheers!" : "Noch einen schönen Tag!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Hallo,\n\n%s hat %s mit dir geteilt.\nDu solltest bereits eine separate E-Mail mit einem Zugriffslink erhalten haben.\n\nDies ist mit dem folgenden Passwort geschützt: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> im Auftrag von %s mit Dir geteilt.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> mit Dir geteilt.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> mit Dir geteilt.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Hallo,<br><br>%s hat <i>%s</i> mit dir geteilt.<br>Du solltest bereits eine separate E-Mail mit einem Zugriffslink erhalten haben.<br><br>Dies ist mit dem folgenden Passwort geschützt: %s<br><br>", + "Share by mail" : "Geteilt über eine E-Mail", + "Send a personalized link to a file or folder by mail." : "Einen personalisierten Link zu einer Datei oder Ordner per E-Mail versenden.", + "Send password by mail" : "Passwort per Mail senden" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/sharebymail/l10n/de.json b/apps/sharebymail/l10n/de.json index a962b416c9d..2baab9fe0d9 100644 --- a/apps/sharebymail/l10n/de.json +++ b/apps/sharebymail/l10n/de.json @@ -12,11 +12,17 @@ "%s shared »%s« with you" : "%s hat „%s“ mit Dir geteilt", "%s shared »%s« with you on behalf of %s" : "%s hat »%s« im Auftrag von %s mit Dir geteilt", "Failed to create the E-mail" : "Erstellen der E-Mail ist fehlgeschalgen", + "Password to access »%s« shared to you by %s" : "Das Passwort zum Zugriff auf %s wurde durch %s mit dir geteilt.", "Could not find share" : "Freigabe konnte nicht gefunden werden", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Hallo,\n\n%s hat »%s« im Auftrag von %s mit Dir geteilt.\n\n%s\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Hallo,\n\n%s hat »%s« mit Dir geteilt.\n\n%s\n", "Cheers!" : "Noch einen schönen Tag!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Hallo,\n\n%s hat %s mit dir geteilt.\nDu solltest bereits eine separate E-Mail mit einem Zugriffslink erhalten haben.\n\nDies ist mit dem folgenden Passwort geschützt: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> im Auftrag von %s mit Dir geteilt.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> mit Dir geteilt.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> mit Dir geteilt.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Hallo,<br><br>%s hat <i>%s</i> mit dir geteilt.<br>Du solltest bereits eine separate E-Mail mit einem Zugriffslink erhalten haben.<br><br>Dies ist mit dem folgenden Passwort geschützt: %s<br><br>", + "Share by mail" : "Geteilt über eine E-Mail", + "Send a personalized link to a file or folder by mail." : "Einen personalisierten Link zu einer Datei oder Ordner per E-Mail versenden.", + "Send password by mail" : "Passwort per Mail senden" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/sharebymail/l10n/de_DE.js b/apps/sharebymail/l10n/de_DE.js index 8d107a17fb1..e4961360323 100644 --- a/apps/sharebymail/l10n/de_DE.js +++ b/apps/sharebymail/l10n/de_DE.js @@ -14,11 +14,17 @@ OC.L10N.register( "%s shared »%s« with you" : "%s hat »%s« mit Ihnen geteilt", "%s shared »%s« with you on behalf of %s" : "%s hat »%s« im Auftrag von %s mit Ihnen geteilt", "Failed to create the E-mail" : "Erstellen der E-Mail fehlgeschlagen", + "Password to access »%s« shared to you by %s" : "Das Passwort zum Zugriff auf %s wurde durch %s mit Ihnen geteilt.", "Could not find share" : "Freigabe konnte nicht gefunden werden", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Hallo,\n\n%s hat »%s« im Auftrag von %s mit Ihnen geteilt.\n\n%s\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Hallo,\n\n%s hat »%s« mit Ihnen geteilt.\n\n%s\n", "Cheers!" : "Einen schönen Tag noch!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Hallo,\n\n%s hat %s mit Ihnen geteilt.\nSie sollten bereits eine separate E-Mail mit einem Zugriffslink erhalten haben.\n\nDies ist mit dem folgenden Passwort geschützt: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> im Auftrag von %s mit Ihnen geteilt.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> mit Ihnen geteilt.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> mit Ihnen geteilt.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Hallo,<br><br>%s hat <i>%s</i> mit Ihnen geteilt.<br>Sie sollten bereits eine separate E-Mail mit einem Zugriffslink erhalten haben.<br><br>Dies ist mit dem folgenden Passwort geschützt: %s<br><br>", + "Share by mail" : "Geteilt über eine E-Mail", + "Send a personalized link to a file or folder by mail." : "Einen personalisierten Link zu einer Datei oder Ordner per E-Mail versenden.", + "Send password by mail" : "Passwort per Mail senden" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/sharebymail/l10n/de_DE.json b/apps/sharebymail/l10n/de_DE.json index 608c04d2f7a..28e4f5566c6 100644 --- a/apps/sharebymail/l10n/de_DE.json +++ b/apps/sharebymail/l10n/de_DE.json @@ -12,11 +12,17 @@ "%s shared »%s« with you" : "%s hat »%s« mit Ihnen geteilt", "%s shared »%s« with you on behalf of %s" : "%s hat »%s« im Auftrag von %s mit Ihnen geteilt", "Failed to create the E-mail" : "Erstellen der E-Mail fehlgeschlagen", + "Password to access »%s« shared to you by %s" : "Das Passwort zum Zugriff auf %s wurde durch %s mit Ihnen geteilt.", "Could not find share" : "Freigabe konnte nicht gefunden werden", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Hallo,\n\n%s hat »%s« im Auftrag von %s mit Ihnen geteilt.\n\n%s\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Hallo,\n\n%s hat »%s« mit Ihnen geteilt.\n\n%s\n", "Cheers!" : "Einen schönen Tag noch!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Hallo,\n\n%s hat %s mit Ihnen geteilt.\nSie sollten bereits eine separate E-Mail mit einem Zugriffslink erhalten haben.\n\nDies ist mit dem folgenden Passwort geschützt: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> im Auftrag von %s mit Ihnen geteilt.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> mit Ihnen geteilt.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hallo,<br><br>%s hat <a href=\"%s\">%s</a> mit Ihnen geteilt.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Hallo,<br><br>%s hat <i>%s</i> mit Ihnen geteilt.<br>Sie sollten bereits eine separate E-Mail mit einem Zugriffslink erhalten haben.<br><br>Dies ist mit dem folgenden Passwort geschützt: %s<br><br>", + "Share by mail" : "Geteilt über eine E-Mail", + "Send a personalized link to a file or folder by mail." : "Einen personalisierten Link zu einer Datei oder Ordner per E-Mail versenden.", + "Send password by mail" : "Passwort per Mail senden" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/sharebymail/l10n/es.js b/apps/sharebymail/l10n/es.js index 3699bc53bd4..6e2a15bba50 100644 --- a/apps/sharebymail/l10n/es.js +++ b/apps/sharebymail/l10n/es.js @@ -14,11 +14,17 @@ OC.L10N.register( "%s shared »%s« with you" : "%s compartió »%s« con usted", "%s shared »%s« with you on behalf of %s" : "%s compartió »%s« con usted a nombre de %s", "Failed to create the E-mail" : "Falló crear el correo electrónico", + "Password to access »%s« shared to you by %s" : "Contraseña para acceder »%s« compartido con usted por %s", "Could not find share" : "No se pudo encontrar el recurso compartido", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "¡Hola!,\n\n%s comapartió »%s« con usted a nombre de %s.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Hola,\n\n%s compartió »%s« con usted.\n\n%s\n\n", "Cheers!" : "¡Ánimo!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Hola que tal,\n\n%s compartió »%s« contigo.\nDeberías ya haber recibido un mensaje separado con un enlace para acceder a él.\n\nEstá protegido por la siguiente contraseña: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Hola,<br><br>%s compartió <a href=\"%s\">%s</a> con usted a nombre de %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hola,<br><br>%s compartió <a href=\"%s\">%s</a> con usted.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hola,<br><br>%s compartió <a href=\"%s\">%s</a> con usted.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Hola que tal,<br><br>%s compartió <i>%s</i> contigo.<br>Deberías ya haber recibido un mensaje separado con un enlace para acceder a él.<br><br>Está protegido por la siguiente contraseña: %s<br><br>", + "Share by mail" : "Enviado por correo electrónico", + "Send a personalized link to a file or folder by mail." : "Enviar un enlace personalizado a uno de los archivos o carpetas por correo electrónico.", + "Send password by mail" : "Enviar contraseñas por email" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/sharebymail/l10n/es.json b/apps/sharebymail/l10n/es.json index 41d31f57fbd..587497e72d9 100644 --- a/apps/sharebymail/l10n/es.json +++ b/apps/sharebymail/l10n/es.json @@ -12,11 +12,17 @@ "%s shared »%s« with you" : "%s compartió »%s« con usted", "%s shared »%s« with you on behalf of %s" : "%s compartió »%s« con usted a nombre de %s", "Failed to create the E-mail" : "Falló crear el correo electrónico", + "Password to access »%s« shared to you by %s" : "Contraseña para acceder »%s« compartido con usted por %s", "Could not find share" : "No se pudo encontrar el recurso compartido", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "¡Hola!,\n\n%s comapartió »%s« con usted a nombre de %s.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Hola,\n\n%s compartió »%s« con usted.\n\n%s\n\n", "Cheers!" : "¡Ánimo!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Hola que tal,\n\n%s compartió »%s« contigo.\nDeberías ya haber recibido un mensaje separado con un enlace para acceder a él.\n\nEstá protegido por la siguiente contraseña: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Hola,<br><br>%s compartió <a href=\"%s\">%s</a> con usted a nombre de %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hola,<br><br>%s compartió <a href=\"%s\">%s</a> con usted.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hola,<br><br>%s compartió <a href=\"%s\">%s</a> con usted.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Hola que tal,<br><br>%s compartió <i>%s</i> contigo.<br>Deberías ya haber recibido un mensaje separado con un enlace para acceder a él.<br><br>Está protegido por la siguiente contraseña: %s<br><br>", + "Share by mail" : "Enviado por correo electrónico", + "Send a personalized link to a file or folder by mail." : "Enviar un enlace personalizado a uno de los archivos o carpetas por correo electrónico.", + "Send password by mail" : "Enviar contraseñas por email" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/sharebymail/l10n/fi.js b/apps/sharebymail/l10n/fi.js index 88d1cc076cc..76ce2b3eed2 100644 --- a/apps/sharebymail/l10n/fi.js +++ b/apps/sharebymail/l10n/fi.js @@ -18,7 +18,12 @@ OC.L10N.register( "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Hei,\n\n%s jakoi kohteen »%s« kanssasi käyttäjän %s puolesta.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Hei,\n\n%s jakoi kohteen »%s« kanssasi.\n\n%s\n\n", "Cheers!" : "Kiitos!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Hei,\n\n%s jakoi kohteen »%s« kanssasi.\nSinulla pitäisi olla erillinen sähköpostiviesti, joka sisältää linkin siihen.\n\nSe on suojattu salasanalla: %s\n\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Hei,<br><br>%s jakoi kohteen <a href=\"%s\">%s</a> kanssasi käyttäjän %s puolesta.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hei,<br><br>%s jakoi kohteen <a href=\"%s\">%s</a> kanssasi.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hei,<br><br>%s jakoi kohteen <a href=\"%s\">%s</a> kanssasi.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Hei,<br><br>%s jakoi kohteen <i>%s</i> kanssasi.<br>Sinulla pitäisi olla erillinen sähköpostiviesti, joka sisältää linkin siihen.<br><br>Se on suojattu salasanalla: %s<br><br>", + "Share by mail" : "Jaa sähköpostitse", + "Send a personalized link to a file or folder by mail." : "Lähetä personoitu linkki tiedostoon tai kansioon sähköpostitse.", + "Send password by mail" : "Lähetä salasana sähköpostitse" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/sharebymail/l10n/fi.json b/apps/sharebymail/l10n/fi.json index fd63221a725..fd113191299 100644 --- a/apps/sharebymail/l10n/fi.json +++ b/apps/sharebymail/l10n/fi.json @@ -16,7 +16,12 @@ "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Hei,\n\n%s jakoi kohteen »%s« kanssasi käyttäjän %s puolesta.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Hei,\n\n%s jakoi kohteen »%s« kanssasi.\n\n%s\n\n", "Cheers!" : "Kiitos!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Hei,\n\n%s jakoi kohteen »%s« kanssasi.\nSinulla pitäisi olla erillinen sähköpostiviesti, joka sisältää linkin siihen.\n\nSe on suojattu salasanalla: %s\n\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Hei,<br><br>%s jakoi kohteen <a href=\"%s\">%s</a> kanssasi käyttäjän %s puolesta.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hei,<br><br>%s jakoi kohteen <a href=\"%s\">%s</a> kanssasi.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Hei,<br><br>%s jakoi kohteen <a href=\"%s\">%s</a> kanssasi.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Hei,<br><br>%s jakoi kohteen <i>%s</i> kanssasi.<br>Sinulla pitäisi olla erillinen sähköpostiviesti, joka sisältää linkin siihen.<br><br>Se on suojattu salasanalla: %s<br><br>", + "Share by mail" : "Jaa sähköpostitse", + "Send a personalized link to a file or folder by mail." : "Lähetä personoitu linkki tiedostoon tai kansioon sähköpostitse.", + "Send password by mail" : "Lähetä salasana sähköpostitse" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/sharebymail/l10n/fr.js b/apps/sharebymail/l10n/fr.js index 5d8973276b4..54e0aa6662a 100644 --- a/apps/sharebymail/l10n/fr.js +++ b/apps/sharebymail/l10n/fr.js @@ -14,11 +14,17 @@ OC.L10N.register( "%s shared »%s« with you" : "%s a partagé «%s» avec vous", "%s shared »%s« with you on behalf of %s" : "%s a partagé «%s» avec vous de la part de %s", "Failed to create the E-mail" : "Erreur lors de la création du mail", + "Password to access »%s« shared to you by %s" : "Mot de passe pour accèder à «%s» partagé par %s", "Could not find share" : "Impossible de trouver le partage", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Bonjour,\n\n%s a partagé «%s» avec vous de la part de %s.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Bonjour,\n\n%s a partagé «%s» avec vous.\n\n%s\n\n", "Cheers!" : "À bientôt !", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Bonjour,\n\n%s a partagé «%s» avec vous.\nVous avez normalement déjà reçu un autre email avec un lien pour y accéder.\n\nIl est protégé avec le mot de passe suivant : %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Bonjour,<br><br>%s a partagé <a href=\"%s\">%s</a> avec vous de la part de %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Bonjour,<br><br>%s a partagé <a href=\"%s\">%s</a> avec vous.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Bonjour,<br><br>%s a partagé <a href=\"%s\">%s</a> avec vous.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Bonjour,<br><br>%s a partagé <i>%s</i> avec vous.<br>Vous avez normalement déjà reçu un autre email avec un lien pour y accéder.<br><br> Il est protégé avec le mot de passe suivant : %s<br><br>", + "Share by mail" : "Partage par email", + "Send a personalized link to a file or folder by mail." : "Envoyer un lien personnalisé vers un fichier ou un dossier par email.", + "Send password by mail" : "Envoyer le mot de passe par email" }, "nplurals=2; plural=(n > 1);"); diff --git a/apps/sharebymail/l10n/fr.json b/apps/sharebymail/l10n/fr.json index 00dbfd4e850..7ab94893771 100644 --- a/apps/sharebymail/l10n/fr.json +++ b/apps/sharebymail/l10n/fr.json @@ -12,11 +12,17 @@ "%s shared »%s« with you" : "%s a partagé «%s» avec vous", "%s shared »%s« with you on behalf of %s" : "%s a partagé «%s» avec vous de la part de %s", "Failed to create the E-mail" : "Erreur lors de la création du mail", + "Password to access »%s« shared to you by %s" : "Mot de passe pour accèder à «%s» partagé par %s", "Could not find share" : "Impossible de trouver le partage", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Bonjour,\n\n%s a partagé «%s» avec vous de la part de %s.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Bonjour,\n\n%s a partagé «%s» avec vous.\n\n%s\n\n", "Cheers!" : "À bientôt !", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Bonjour,\n\n%s a partagé «%s» avec vous.\nVous avez normalement déjà reçu un autre email avec un lien pour y accéder.\n\nIl est protégé avec le mot de passe suivant : %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Bonjour,<br><br>%s a partagé <a href=\"%s\">%s</a> avec vous de la part de %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Bonjour,<br><br>%s a partagé <a href=\"%s\">%s</a> avec vous.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Bonjour,<br><br>%s a partagé <a href=\"%s\">%s</a> avec vous.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Bonjour,<br><br>%s a partagé <i>%s</i> avec vous.<br>Vous avez normalement déjà reçu un autre email avec un lien pour y accéder.<br><br> Il est protégé avec le mot de passe suivant : %s<br><br>", + "Share by mail" : "Partage par email", + "Send a personalized link to a file or folder by mail." : "Envoyer un lien personnalisé vers un fichier ou un dossier par email.", + "Send password by mail" : "Envoyer le mot de passe par email" },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/apps/sharebymail/l10n/it.js b/apps/sharebymail/l10n/it.js index 6711acbef00..e6bfdf2d02f 100644 --- a/apps/sharebymail/l10n/it.js +++ b/apps/sharebymail/l10n/it.js @@ -19,6 +19,7 @@ OC.L10N.register( "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Ciao,\n\n%s ha condiviso «%s» con te.\n\n%s\n\n", "Cheers!" : "Saluti!", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Ciao, <br><br>%s ha condiviso <a href=\"%s\">%s</a> con te per conto di %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Ciao, <br><br>%s ha condiviso <a href=\"%s\">%s</a> con te.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Ciao, <br><br>%s ha condiviso <a href=\"%s\">%s</a> con te.<br><br>", + "Share by mail" : "Condividi tramite email" }, "nplurals=2; plural=(n != 1);"); diff --git a/apps/sharebymail/l10n/it.json b/apps/sharebymail/l10n/it.json index d08dc8f7f2c..00e59d45f44 100644 --- a/apps/sharebymail/l10n/it.json +++ b/apps/sharebymail/l10n/it.json @@ -17,6 +17,7 @@ "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Ciao,\n\n%s ha condiviso «%s» con te.\n\n%s\n\n", "Cheers!" : "Saluti!", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Ciao, <br><br>%s ha condiviso <a href=\"%s\">%s</a> con te per conto di %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Ciao, <br><br>%s ha condiviso <a href=\"%s\">%s</a> con te.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Ciao, <br><br>%s ha condiviso <a href=\"%s\">%s</a> con te.<br><br>", + "Share by mail" : "Condividi tramite email" },"pluralForm" :"nplurals=2; plural=(n != 1);" }
\ No newline at end of file diff --git a/apps/sharebymail/l10n/pt_BR.js b/apps/sharebymail/l10n/pt_BR.js index 1cc2acfde19..cafe8ffb746 100644 --- a/apps/sharebymail/l10n/pt_BR.js +++ b/apps/sharebymail/l10n/pt_BR.js @@ -14,11 +14,17 @@ OC.L10N.register( "%s shared »%s« with you" : "%s compartilhado »%s« com você", "%s shared »%s« with you on behalf of %s" : "%s compartilhado »%s« com você em nome de %s", "Failed to create the E-mail" : "Falha ao criar o E-mail", + "Password to access »%s« shared to you by %s" : "Senha para acessar %s compartilhado com você por %s", "Could not find share" : "Não foi possível encontrar o compartilhamento", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Olá,\n%s compartilhou »%s« com você em nome de %s.\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Olá,\n%s compartilhou »%s« com você.\n%s\n", "Cheers!" : "Felicidades!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Olá,\n%s compartilhou %s com você.\nVocê já deve ter recebido um e-mail separado com um link para acessá-lo.\nÉ protegido com a seguinte senha: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Olá,<br><br>%s compartilhado <a href=\"%s\">%s</a> com voc^em nome de %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Olá,<br><br>%s compartilhado <a href=\"%s\">%s</a> com você.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Olá,<br><br>%s compartilhado <a href=\"%s\">%s</a> com você.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Olá, <br> <br> %s shared <i>%s</ i> com você. <br> Você já deve ter recebido um e-mail separado com um link para acessá-lo. <br><br> Ele é protegido com o seguinte Senha: %s", + "Share by mail" : "Partilhar por correio", + "Send a personalized link to a file or folder by mail." : "Envie um link personalizado para um arquivo ou pasta por e-mail.", + "Send password by mail" : "nviar senha por e-mail" }, "nplurals=2; plural=(n > 1);"); diff --git a/apps/sharebymail/l10n/pt_BR.json b/apps/sharebymail/l10n/pt_BR.json index 9a41c61696e..783c0cec8fe 100644 --- a/apps/sharebymail/l10n/pt_BR.json +++ b/apps/sharebymail/l10n/pt_BR.json @@ -12,11 +12,17 @@ "%s shared »%s« with you" : "%s compartilhado »%s« com você", "%s shared »%s« with you on behalf of %s" : "%s compartilhado »%s« com você em nome de %s", "Failed to create the E-mail" : "Falha ao criar o E-mail", + "Password to access »%s« shared to you by %s" : "Senha para acessar %s compartilhado com você por %s", "Could not find share" : "Não foi possível encontrar o compartilhamento", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Olá,\n%s compartilhou »%s« com você em nome de %s.\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Olá,\n%s compartilhou »%s« com você.\n%s\n", "Cheers!" : "Felicidades!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Olá,\n%s compartilhou %s com você.\nVocê já deve ter recebido um e-mail separado com um link para acessá-lo.\nÉ protegido com a seguinte senha: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Olá,<br><br>%s compartilhado <a href=\"%s\">%s</a> com voc^em nome de %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Olá,<br><br>%s compartilhado <a href=\"%s\">%s</a> com você.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Olá,<br><br>%s compartilhado <a href=\"%s\">%s</a> com você.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Olá, <br> <br> %s shared <i>%s</ i> com você. <br> Você já deve ter recebido um e-mail separado com um link para acessá-lo. <br><br> Ele é protegido com o seguinte Senha: %s", + "Share by mail" : "Partilhar por correio", + "Send a personalized link to a file or folder by mail." : "Envie um link personalizado para um arquivo ou pasta por e-mail.", + "Send password by mail" : "nviar senha por e-mail" },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/apps/sharebymail/l10n/ru.js b/apps/sharebymail/l10n/ru.js index 2e1a9abe09f..07679c8d2aa 100644 --- a/apps/sharebymail/l10n/ru.js +++ b/apps/sharebymail/l10n/ru.js @@ -14,11 +14,17 @@ OC.L10N.register( "%s shared »%s« with you" : "%s поделился »%s« с вами", "%s shared »%s« with you on behalf of %s" : "%s поделился »%s« с вами от имени %s", "Failed to create the E-mail" : "Не удалось создать e-mail", + "Password to access »%s« shared to you by %s" : "Пароль для доступа к »%s«, которым поделился %s", "Could not find share" : "Не удалось найти общий ресурс", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Привет,\n\n%s предоставил вам общий доступ к »%s« от имени %s.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Привет,\n\n%s предоставил вам общий доступ к »%s«.\n\n%s\n\n", "Cheers!" : "Всего наилучшего!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Привет,\n\n%s поделился »%s«.\nВы уже должны были получить отдельное письмо с сслкой для доступа.\n\nРесурс защищён следующим паролем: %s\n\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Привет,<br><br>%s вам предоставил общий доступ к <a href=\"%s\">%s</a> от имени %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Привет,<br><br>%s вам предоставил общий доступ к <a href=\"%s\">%s</a>.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Привет,<br><br>%s вам предоставил общий доступ к <a href=\"%s\">%s</a>.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Привет,<br><br>%s поделился <i>%s</i>. <br> Вы уже должны были получить отдельное письмо с сслкой для доступа.<br><br>Ресурс защищён следующим паролем: %s<br><br>", + "Share by mail" : "Поделиться по почте", + "Send a personalized link to a file or folder by mail." : "Отправить персональную ссылку на файл или каталог по почте.", + "Send password by mail" : "Отправить пароль почтой" }, "nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);"); diff --git a/apps/sharebymail/l10n/ru.json b/apps/sharebymail/l10n/ru.json index 66009d973dd..c9fce29263a 100644 --- a/apps/sharebymail/l10n/ru.json +++ b/apps/sharebymail/l10n/ru.json @@ -12,11 +12,17 @@ "%s shared »%s« with you" : "%s поделился »%s« с вами", "%s shared »%s« with you on behalf of %s" : "%s поделился »%s« с вами от имени %s", "Failed to create the E-mail" : "Не удалось создать e-mail", + "Password to access »%s« shared to you by %s" : "Пароль для доступа к »%s«, которым поделился %s", "Could not find share" : "Не удалось найти общий ресурс", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Привет,\n\n%s предоставил вам общий доступ к »%s« от имени %s.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Привет,\n\n%s предоставил вам общий доступ к »%s«.\n\n%s\n\n", "Cheers!" : "Всего наилучшего!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Привет,\n\n%s поделился »%s«.\nВы уже должны были получить отдельное письмо с сслкой для доступа.\n\nРесурс защищён следующим паролем: %s\n\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Привет,<br><br>%s вам предоставил общий доступ к <a href=\"%s\">%s</a> от имени %s.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Привет,<br><br>%s вам предоставил общий доступ к <a href=\"%s\">%s</a>.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Привет,<br><br>%s вам предоставил общий доступ к <a href=\"%s\">%s</a>.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Привет,<br><br>%s поделился <i>%s</i>. <br> Вы уже должны были получить отдельное письмо с сслкой для доступа.<br><br>Ресурс защищён следующим паролем: %s<br><br>", + "Share by mail" : "Поделиться по почте", + "Send a personalized link to a file or folder by mail." : "Отправить персональную ссылку на файл или каталог по почте.", + "Send password by mail" : "Отправить пароль почтой" },"pluralForm" :"nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);" }
\ No newline at end of file diff --git a/apps/sharebymail/l10n/tr.js b/apps/sharebymail/l10n/tr.js index 3a9bf810f89..e7c3944ed31 100644 --- a/apps/sharebymail/l10n/tr.js +++ b/apps/sharebymail/l10n/tr.js @@ -14,11 +14,17 @@ OC.L10N.register( "%s shared »%s« with you" : "%s sizinle »%s« ögesini paylaştı", "%s shared »%s« with you on behalf of %s" : "%s sizinle »%s« ögesini %s adına paylaştı", "Failed to create the E-mail" : "E-posta oluşturulamadı", + "Password to access »%s« shared to you by %s" : "»%s« için sizin tarafınızdan %s üzerinden paylaşılan erişim parolası", "Could not find share" : "Paylaşım bulunamadı", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Merhaba,\n\n%s sizinle »%s« ögesini %s adına paylaştı.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Merhaba,\n\n%s sizinle »%s« ögesini paylaştı.\n\n%s\n\n", "Cheers!" : "Hoşça kalın!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Merhaba\n\n%s sizinle »%s« paylaştı.\nErişim bilgilerini içeren başka bir e-posta daha gönderilmiş olmalı.\n\nKoruma parolası: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Merhaba,<br><br>%s sizinle <a href=\"%s\">%s</a> ögesini %s adına paylaştı.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Merhaba,<br><br>%s sizinle <a href=\"%s\">%s</a> ögesini paylaştı.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Merhaba,<br><br>%s sizinle <a href=\"%s\">%s</a> ögesini paylaştı.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Merhaba,<br><br>%s sizinle <i>%s</i> paylaştı.<br>Erişim bilgilerini içeren başka bir e-posta daha gönderilmiş olmalı.<br><br> Koruma parolası: %s<br><br>", + "Share by mail" : "E-posta ile paylaş", + "Send a personalized link to a file or folder by mail." : "Bir dosya ya da klasörün kişiselleştirilmiş bağlantısını e-posta ile gönderin.", + "Send password by mail" : "Parolayı e-posta ile gönder" }, "nplurals=2; plural=(n > 1);"); diff --git a/apps/sharebymail/l10n/tr.json b/apps/sharebymail/l10n/tr.json index b6b07c20491..c214174465c 100644 --- a/apps/sharebymail/l10n/tr.json +++ b/apps/sharebymail/l10n/tr.json @@ -12,11 +12,17 @@ "%s shared »%s« with you" : "%s sizinle »%s« ögesini paylaştı", "%s shared »%s« with you on behalf of %s" : "%s sizinle »%s« ögesini %s adına paylaştı", "Failed to create the E-mail" : "E-posta oluşturulamadı", + "Password to access »%s« shared to you by %s" : "»%s« için sizin tarafınızdan %s üzerinden paylaşılan erişim parolası", "Could not find share" : "Paylaşım bulunamadı", "Hey there,\n\n%s shared »%s« with you on behalf of %s.\n\n%s\n\n" : "Merhaba,\n\n%s sizinle »%s« ögesini %s adına paylaştı.\n\n%s\n\n", "Hey there,\n\n%s shared »%s« with you.\n\n%s\n\n" : "Merhaba,\n\n%s sizinle »%s« ögesini paylaştı.\n\n%s\n\n", "Cheers!" : "Hoşça kalın!", + "Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n" : "Merhaba\n\n%s sizinle »%s« paylaştı.\nErişim bilgilerini içeren başka bir e-posta daha gönderilmiş olmalı.\n\nKoruma parolası: %s\n", "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you on behalf of %s.<br><br>" : "Merhaba,<br><br>%s sizinle <a href=\"%s\">%s</a> ögesini %s adına paylaştı.<br><br>", - "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Merhaba,<br><br>%s sizinle <a href=\"%s\">%s</a> ögesini paylaştı.<br><br>" + "Hey there,<br><br>%s shared <a href=\"%s\">%s</a> with you.<br><br>" : "Merhaba,<br><br>%s sizinle <a href=\"%s\">%s</a> ögesini paylaştı.<br><br>", + "Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>" : "Merhaba,<br><br>%s sizinle <i>%s</i> paylaştı.<br>Erişim bilgilerini içeren başka bir e-posta daha gönderilmiş olmalı.<br><br> Koruma parolası: %s<br><br>", + "Share by mail" : "E-posta ile paylaş", + "Send a personalized link to a file or folder by mail." : "Bir dosya ya da klasörün kişiselleştirilmiş bağlantısını e-posta ile gönderin.", + "Send password by mail" : "Parolayı e-posta ile gönder" },"pluralForm" :"nplurals=2; plural=(n > 1);" }
\ No newline at end of file diff --git a/apps/sharebymail/lib/Settings/Admin.php b/apps/sharebymail/lib/Settings/Admin.php new file mode 100644 index 00000000000..b6e7e5d3b4a --- /dev/null +++ b/apps/sharebymail/lib/Settings/Admin.php @@ -0,0 +1,67 @@ +<?php +/** + * @copyright Copyright (c) 2017 Bjoern Schiessle <bjoern@schiessle.org> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + +namespace OCA\ShareByMail\Settings; + +use OCP\AppFramework\Http\TemplateResponse; +use OCP\Settings\ISettings; + +class Admin implements ISettings { + + /** @var SettingsManager */ + private $settingsManager; + + public function __construct(SettingsManager $settingsManager) { + $this->settingsManager = $settingsManager; + } + + /** + * @return TemplateResponse + */ + public function getForm() { + + $parameters = [ + 'sendPasswordMail' => $this->settingsManager->sendPasswordByMail() + ]; + + return new TemplateResponse('sharebymail', 'settings-admin', $parameters, ''); + } + + /** + * @return string the section ID, e.g. 'sharing' + */ + public function getSection() { + return 'sharing'; + } + + /** + * @return int whether the form should be rather on the top or bottom of + * the admin section. The forms are arranged in ascending order of the + * priority values. It is required to return a value between 0 and 100. + * + * E.g.: 70 + */ + public function getPriority() { + return 40; + } + +} diff --git a/apps/sharebymail/lib/Settings/SettingsManager.php b/apps/sharebymail/lib/Settings/SettingsManager.php new file mode 100644 index 00000000000..205b253f337 --- /dev/null +++ b/apps/sharebymail/lib/Settings/SettingsManager.php @@ -0,0 +1,49 @@ +<?php +/** + * @copyright Copyright (c) 2017 Bjoern Schiessle <bjoern@schiessle.org> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + + +namespace OCA\ShareByMail\Settings; + + +use OCP\IConfig; + +class SettingsManager { + + /** @var IConfig */ + private $config; + + private $defaultSetting = 'yes'; + + public function __construct(IConfig $config) { + $this->config = $config; + } + + /** + * should the password for a mail share be send to the recipient + * + * @return bool + */ + public function sendPasswordByMail() { + $sendPasswordByMail = $this->config->getAppValue('sharebymail', 'sendpasswordmail', $this->defaultSetting); + return $sendPasswordByMail === 'yes'; + } + +} diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index e09ca308f31..332f1c0cf74 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -23,7 +23,9 @@ namespace OCA\ShareByMail; use OC\HintException; use OC\Share20\Exception\InvalidShare; +use OCA\ShareByMail\Settings\SettingsManager; use OCP\Activity\IManager; +use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\Node; @@ -75,13 +77,16 @@ class ShareByMailProvider implements IShareProvider { /** @var IManager */ private $activityManager; + /** @var SettingsManager */ + private $settingsManager; + /** * Return the identifier of this provider. * * @return string Containing only [a-zA-Z0-9] */ public function identifier() { - return 'ocShareByMail'; + return 'ocMailShare'; } /** @@ -96,6 +101,7 @@ class ShareByMailProvider implements IShareProvider { * @param IMailer $mailer * @param IURLGenerator $urlGenerator * @param IManager $activityManager + * @param SettingsManager $settingsManager */ public function __construct( IDBConnection $connection, @@ -106,7 +112,8 @@ class ShareByMailProvider implements IShareProvider { ILogger $logger, IMailer $mailer, IURLGenerator $urlGenerator, - IManager $activityManager + IManager $activityManager, + SettingsManager $settingsManager ) { $this->dbConnection = $connection; $this->secureRandom = $secureRandom; @@ -117,6 +124,7 @@ class ShareByMailProvider implements IShareProvider { $this->mailer = $mailer; $this->urlGenerator = $urlGenerator; $this->activityManager = $activityManager; + $this->settingsManager = $settingsManager; } /** @@ -275,10 +283,10 @@ class ShareByMailProvider implements IShareProvider { protected function createMailBody($template, $filename, $link, $owner, $initiator) { $mailBodyTemplate = new Template('sharebymail', $template, ''); - $mailBodyTemplate->assign ('filename', $filename); + $mailBodyTemplate->assign ('filename', \OCP\Util::sanitizeHTML($filename)); $mailBodyTemplate->assign ('link', $link); - $mailBodyTemplate->assign ('owner', $owner); - $mailBodyTemplate->assign ('initiator', $initiator); + $mailBodyTemplate->assign ('owner', \OCP\Util::sanitizeHTML($owner)); + $mailBodyTemplate->assign ('initiator', \OCP\Util::sanitizeHTML($initiator)); $mailBodyTemplate->assign ('onBehalfOf', $initiator !== $owner); $mailBody = $mailBodyTemplate->fetchPage(); @@ -291,6 +299,60 @@ class ShareByMailProvider implements IShareProvider { } /** + * send password to recipient of a mail share + * + * @param string $filename + * @param string $initiator + * @param string $shareWith + */ + protected function sendPassword($filename, $initiator, $shareWith, $password) { + + if ($this->settingsManager->sendPasswordByMail() === false) { + return; + } + + $initiatorUser = $this->userManager->get($initiator); + $initiatorDisplayName = ($initiatorUser instanceof IUser) ? $initiatorUser->getDisplayName() : $initiator; + $subject = (string)$this->l->t('Password to access »%s« shared to you by %s', [$filename, $initiatorDisplayName]); + + $message = $this->mailer->createMessage(); + $htmlBody = $this->createMailBodyToSendPassword('mailpassword', $filename, $initiatorDisplayName, $password); + $textBody = $this->createMailBodyToSendPassword('altmailpassword', $filename,$initiatorDisplayName, $password); + $message->setTo([$shareWith]); + $message->setSubject($subject); + $message->setBody($textBody, 'text/plain'); + $message->setHtmlBody($htmlBody); + $this->mailer->send($message); + + } + + /** + * create mail body to send password to recipient + * + * @param string $filename + * @param string $initiator + * @param string $password + * @return string plain text mail + * @throws HintException + */ + protected function createMailBodyToSendPassword($template, $filename, $initiator, $password) { + + $mailBodyTemplate = new Template('sharebymail', $template, ''); + $mailBodyTemplate->assign ('filename', \OCP\Util::sanitizeHTML($filename)); + $mailBodyTemplate->assign ('password', \OCP\Util::sanitizeHTML($password)); + $mailBodyTemplate->assign ('initiator', \OCP\Util::sanitizeHTML($initiator)); + $mailBody = $mailBodyTemplate->fetchPage(); + + if (is_string($mailBody)) { + return $mailBody; + } + + throw new HintException('Failed to create the E-mail', + $this->l->t('Failed to create the E-mail')); + } + + + /** * generate share token * * @return string @@ -368,19 +430,31 @@ class ShareByMailProvider implements IShareProvider { * Update a share * * @param IShare $share + * @param string|null $plainTextPassword * @return IShare The share object */ - public function update(IShare $share) { + public function update(IShare $share, $plainTextPassword = null) { + + $originalShare = $this->getShareById($share->getId()); + + // a real password was given + $validPassword = $plainTextPassword !== null && $plainTextPassword !== ''; + + if($validPassword && $originalShare->getPassword() !== $share->getPassword()) { + $this->sendPassword($share->getNode()->getName(), $share->getSharedBy(), $share->getSharedWith(), $plainTextPassword); + } /* - * We allow updating the permissions of mail shares + * We allow updating the permissions and password of mail shares */ $qb = $this->dbConnection->getQueryBuilder(); - $qb->update('share') - ->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId()))) - ->set('permissions', $qb->createNamedParameter($share->getPermissions())) - ->set('uid_owner', $qb->createNamedParameter($share->getShareOwner())) - ->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy())) - ->execute(); + $qb->update('share') + ->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId()))) + ->set('permissions', $qb->createNamedParameter($share->getPermissions())) + ->set('uid_owner', $qb->createNamedParameter($share->getShareOwner())) + ->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy())) + ->set('password', $qb->createNamedParameter($share->getPassword())) + ->set('expiration', $qb->createNamedParameter($share->getExpirationDate(), IQueryBuilder::PARAM_DATE)) + ->execute(); return $share; } @@ -625,6 +699,7 @@ class ShareByMailProvider implements IShareProvider { $shareTime->setTimestamp((int)$data['stime']); $share->setShareTime($shareTime); $share->setSharedWith($data['share_with']); + $share->setPassword($data['password']); if ($data['uid_initiator'] !== null) { $share->setShareOwner($data['uid_owner']); @@ -638,6 +713,13 @@ class ShareByMailProvider implements IShareProvider { $share->setShareOwner($owner->getUID()); } + if ($data['expiration'] !== null) { + $expiration = \DateTime::createFromFormat('Y-m-d H:i:s', $data['expiration']); + if ($expiration !== false) { + $share->setExpirationDate($expiration); + } + } + $share->setNodeId((int)$data['file_source']); $share->setNodeType($data['item_type']); diff --git a/apps/sharebymail/templates/altmailpassword.php b/apps/sharebymail/templates/altmailpassword.php new file mode 100644 index 00000000000..f6e4c5b4158 --- /dev/null +++ b/apps/sharebymail/templates/altmailpassword.php @@ -0,0 +1,32 @@ +<?php +/** + * @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +/** @var OC_Theme $theme */ +/** @var array $_ */ +print_unescaped($l->t("Hey there,\n\n%s shared »%s« with you.\nYou should have already received a separate mail with a link to access it.\n\nIt is protected with the following password: %s\n\n", [$_['initiator'], $_['filename'], $_['password']])); +// TRANSLATORS term at the end of a mail +p($l->t("Cheers!")); +print_unescaped("\n"); +?> + + -- +<?php p($theme->getName() . ' - ' . $theme->getSlogan()); ?> +<?php print_unescaped("\n".$theme->getBaseUrl()); diff --git a/apps/sharebymail/templates/mailpassword.php b/apps/sharebymail/templates/mailpassword.php new file mode 100644 index 00000000000..714a61cecd9 --- /dev/null +++ b/apps/sharebymail/templates/mailpassword.php @@ -0,0 +1,59 @@ +<?php +/** + * @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +/** @var OCA\Theming\ThemingDefaults $theme */ +/** @var array $_ */ +?> + +<table cellspacing="0" cellpadding="0" border="0" width="100%"> + <tr><td> + <table cellspacing="0" cellpadding="0" border="0" width="600px"> + <tr> + <td colspan="2" bgcolor="<?php p($theme->getColorPrimary());?>"> + <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL(image_path('', 'logo-mail.png'))); ?>" alt="<?php p($theme->getName()); ?>"/> + </td> + </tr> + <tr><td colspan="2"> </td></tr> + <tr> + <td width="20px"> </td> + <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;"> + <?php + print_unescaped($l->t('Hey there,<br><br>%s shared <i>%s</i> with you.<br>You should have already received a separate mail with a link to access it.<br><br>It is protected with the following password: %s<br><br>', [$_['initiator'], $_['filename'], $_['password']])); + // TRANSLATORS term at the end of a mail + p($l->t('Cheers!')); + ?> + </td> + </tr> + <tr><td colspan="2"> </td></tr> + <tr> + <td width="20px"> </td> + <td style="font-weight:normal; font-size:0.8em; line-height:1.2em; font-family:verdana,'arial',sans;">--<br> + <?php p($theme->getName()); ?> - + <?php p($theme->getSlogan()); ?> + <br><a href="<?php p($theme->getBaseUrl()); ?>"><?php p($theme->getBaseUrl());?></a> + </td> + </tr> + <tr> + <td colspan="2"> </td> + </tr> + </table> + </td></tr> +</table> diff --git a/apps/sharebymail/templates/settings-admin.php b/apps/sharebymail/templates/settings-admin.php new file mode 100644 index 00000000000..c4e41086063 --- /dev/null +++ b/apps/sharebymail/templates/settings-admin.php @@ -0,0 +1,18 @@ +<?php +/** @var array $_ */ +use OCA\Federation\TrustedServers; + +/** @var \OCP\IL10N $l */ +script('sharebymail', 'settings-admin'); +?> +<div id="ncShareByMailSettings" class="section"> + <h2><?php p($l->t('Share by mail')); ?></h2> + <em><?php p($l->t('Send a personalized link to a file or folder by mail.')); ?></em> + + <p> + <input id="sendPasswordMail" type="checkbox" class="checkbox" <?php if($_['sendPasswordMail']) p('checked'); ?> /> + <label for="sendPasswordMail"><?php p($l->t('Send password by mail')); ?></label> + </p> + +</div> + diff --git a/apps/sharebymail/tests/ShareByMailProviderTest.php b/apps/sharebymail/tests/ShareByMailProviderTest.php index 65eded3eb7d..288ebb4bb45 100644 --- a/apps/sharebymail/tests/ShareByMailProviderTest.php +++ b/apps/sharebymail/tests/ShareByMailProviderTest.php @@ -23,7 +23,7 @@ namespace OCA\ShareByMail\Tests; -use OC\HintException; +use OCA\ShareByMail\Settings\SettingsManager; use OCA\ShareByMail\ShareByMailProvider; use OCP\Files\IRootFolder; use OCP\IDBConnection; @@ -33,7 +33,6 @@ use OCP\IURLGenerator; use OCP\IUserManager; use OCP\Mail\IMailer; use OCP\Security\ISecureRandom; -use OCP\Share\Exceptions\ShareNotFound; use OCP\Share\IManager; use OCP\Share\IShare; use Test\TestCase; @@ -79,6 +78,9 @@ class ShareByMailProviderTest extends TestCase { /** @var \OCP\Activity\IManager | \PHPUnit_Framework_MockObject_MockObject */ private $activityManager; + /** @var SettingsManager | \PHPUnit_Framework_MockObject_MockObject */ + private $settingsManager; + public function setUp() { parent::setUp(); @@ -98,6 +100,7 @@ class ShareByMailProviderTest extends TestCase { $this->urlGenerator = $this->getMockBuilder('\OCP\IUrlGenerator')->getMock(); $this->share = $this->getMockBuilder('\OCP\Share\IShare')->getMock(); $this->activityManager = $this->getMockBuilder('OCP\Activity\IManager')->getMock(); + $this->settingsManager = $this->getMockBuilder(SettingsManager::class)->disableOriginalConstructor()->getMock(); $this->userManager->expects($this->any())->method('userExists')->willReturn(true); } @@ -121,7 +124,8 @@ class ShareByMailProviderTest extends TestCase { $this->logger, $this->mailer, $this->urlGenerator, - $this->activityManager + $this->activityManager, + $this->settingsManager ] ); @@ -139,7 +143,8 @@ class ShareByMailProviderTest extends TestCase { $this->logger, $this->mailer, $this->urlGenerator, - $this->activityManager + $this->activityManager, + $this->settingsManager ); } @@ -311,7 +316,7 @@ class ShareByMailProviderTest extends TestCase { $this->share->expects($this->once())->method('getPermissions')->willReturn($permissions + 1); $this->share->expects($this->once())->method('getShareOwner')->willReturn($uidOwner); $this->share->expects($this->once())->method('getSharedBy')->willReturn($sharedBy); - $this->share->expects($this->once())->method('getId')->willReturn($id); + $this->share->expects($this->atLeastOnce())->method('getId')->willReturn($id); $this->assertSame($this->share, $instance->update($this->share) diff --git a/apps/theming/l10n/sk.js b/apps/theming/l10n/sk.js index 5f3693fbad1..f735ce5a409 100644 --- a/apps/theming/l10n/sk.js +++ b/apps/theming/l10n/sk.js @@ -1,7 +1,7 @@ OC.L10N.register( "theming", { - "Admin" : "Administrátor", + "Admin" : "Správca", "a safe home for all your data" : "bezpečný domov pre všetky vaše dáta", "The given name is too long" : "Zadané meno je príliš dlhé", "The given web address is too long" : "Zadaná web adresa je príliš dlhá", diff --git a/apps/theming/l10n/sk.json b/apps/theming/l10n/sk.json index c63920d620c..31ab56f00c0 100644 --- a/apps/theming/l10n/sk.json +++ b/apps/theming/l10n/sk.json @@ -1,5 +1,5 @@ { "translations": { - "Admin" : "Administrátor", + "Admin" : "Správca", "a safe home for all your data" : "bezpečný domov pre všetky vaše dáta", "The given name is too long" : "Zadané meno je príliš dlhé", "The given web address is too long" : "Zadaná web adresa je príliš dlhá", diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 5a863b1eb22..d4dc56d3ba9 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -1,6 +1,7 @@ <?php /** * @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org> + * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch> * * @license GNU AGPL version 3 or any later version * @@ -19,15 +20,14 @@ * */ - namespace OCA\Theming; +use OCP\Files\IAppData; use OCP\ICacheFactory; use OCP\IConfig; use OCP\IL10N; use OCP\IURLGenerator; -use OCP\Files\IRootFolder; use OCP\Util; class ThemingDefaults extends \OC_Defaults { @@ -38,8 +38,8 @@ class ThemingDefaults extends \OC_Defaults { private $l; /** @var IURLGenerator */ private $urlGenerator; - /** @var IRootFolder */ - private $rootFolder; + /** @var IAppData */ + private $appData; /** @var ICacheFactory */ private $cacheFactory; /** @var string */ @@ -58,21 +58,21 @@ class ThemingDefaults extends \OC_Defaults { * @param IL10N $l * @param IURLGenerator $urlGenerator * @param \OC_Defaults $defaults - * @param IRootFolder $rootFolder + * @param IAppData $appData * @param ICacheFactory $cacheFactory */ public function __construct(IConfig $config, IL10N $l, IURLGenerator $urlGenerator, \OC_Defaults $defaults, - IRootFolder $rootFolder, + IAppData $appData, ICacheFactory $cacheFactory ) { parent::__construct(); $this->config = $config; $this->l = $l; $this->urlGenerator = $urlGenerator; - $this->rootFolder = $rootFolder; + $this->appData = $appData; $this->cacheFactory = $cacheFactory; $this->name = $defaults->getName(); @@ -130,11 +130,19 @@ class ThemingDefaults extends \OC_Defaults { */ public function getLogo() { $logo = $this->config->getAppValue('theming', 'logoMime'); - if(!$logo || !$this->rootFolder->nodeExists('/themedinstancelogo')) { + + $logoExists = true; + try { + $this->appData->getFolder('images')->getFile('logo'); + } catch (\Exception $e) { + $logoExists = false; + } + + if(!$logo || !$logoExists) { return $this->urlGenerator->imagePath('core','logo.svg'); - } else { - return $this->urlGenerator->linkToRoute('theming.Theming.getLogo'); } + + return $this->urlGenerator->linkToRoute('theming.Theming.getLogo'); } /** @@ -144,11 +152,19 @@ class ThemingDefaults extends \OC_Defaults { */ public function getBackground() { $backgroundLogo = $this->config->getAppValue('theming', 'backgroundMime'); - if(!$backgroundLogo || !$this->rootFolder->nodeExists('/themedbackgroundlogo')) { + + $backgroundExists = true; + try { + $this->appData->getFolder('images')->getFile('background'); + } catch (\Exception $e) { + $backgroundExists = false; + } + + if(!$backgroundLogo || !$backgroundExists) { return $this->urlGenerator->imagePath('core','background.jpg'); - } else { - return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground'); } + + return $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground'); } /** @@ -175,6 +191,15 @@ class ThemingDefaults extends \OC_Defaults { } /** + * Gets the current cache buster count + * + * @return string + */ + public function getCacheBusterCounter() { + return $this->config->getAppValue('theming', 'cachebuster', '0'); + } + + /** * Increases the cache buster key */ private function increaseCacheBuster() { diff --git a/apps/theming/tests/ThemingDefaultsTest.php b/apps/theming/tests/ThemingDefaultsTest.php index 72ccaa57d77..986b2f34267 100644 --- a/apps/theming/tests/ThemingDefaultsTest.php +++ b/apps/theming/tests/ThemingDefaultsTest.php @@ -24,37 +24,36 @@ namespace OCA\Theming\Tests; use OCA\Theming\ThemingDefaults; +use OCP\Files\IAppData; +use OCP\Files\SimpleFS\ISimpleFolder; use OCP\ICacheFactory; use OCP\IConfig; use OCP\IL10N; use OCP\IURLGenerator; -use OCP\Files\IRootFolder; use Test\TestCase; class ThemingDefaultsTest extends TestCase { - /** @var IConfig */ + /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */ private $config; - /** @var IL10N */ + /** @var IL10N|\PHPUnit_Framework_MockObject_MockObject */ private $l10n; - /** @var IURLGenerator */ + /** @var IURLGenerator|\PHPUnit_Framework_MockObject_MockObject */ private $urlGenerator; - /** @var \OC_Defaults */ + /** @var \OC_Defaults|\PHPUnit_Framework_MockObject_MockObject */ private $defaults; + /** @var IAppData|\PHPUnit_Framework_MockObject_MockObject */ + private $appData; + /** @var ICacheFactory|\PHPUnit_Framework_MockObject_MockObject */ + private $cacheFactory; /** @var ThemingDefaults */ private $template; - /** @var IRootFolder */ - private $rootFolder; - /** @var ICacheFactory */ - private $cacheFactory; public function setUp() { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class)->getMock(); $this->l10n = $this->getMockBuilder(IL10N::class)->getMock(); $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)->getMock(); - $this->rootFolder = $this->getMockBuilder(IRootFolder::class) - ->disableOriginalConstructor() - ->getMock(); + $this->appData = $this->createMock(IAppData::class); $this->cacheFactory = $this->getMockBuilder(ICacheFactory::class)->getMock(); $this->defaults = $this->getMockBuilder(\OC_Defaults::class) ->disableOriginalConstructor() @@ -80,7 +79,7 @@ class ThemingDefaultsTest extends TestCase { $this->l10n, $this->urlGenerator, $this->defaults, - $this->rootFolder, + $this->appData, $this->cacheFactory ); } @@ -386,6 +385,11 @@ class ThemingDefaultsTest extends TestCase { ->method('getAppValue') ->with('theming', 'backgroundMime') ->willReturn(''); + $this->appData + ->expects($this->once()) + ->method('getFolder') + ->with('images') + ->willThrowException(new \Exception()); $expected = $this->urlGenerator->imagePath('core','background.jpg'); $this->assertEquals($expected, $this->template->getBackground()); } @@ -396,6 +400,17 @@ class ThemingDefaultsTest extends TestCase { ->method('getAppValue') ->with('theming', 'backgroundMime') ->willReturn('image/svg+xml'); + $simpleFolder = $this->createMock(ISimpleFolder::class); + $this->appData + ->expects($this->once()) + ->method('getFolder') + ->with('images') + ->willReturn($simpleFolder); + $simpleFolder + ->expects($this->once()) + ->method('getFile') + ->with('background') + ->willReturn(''); $expected = $this->urlGenerator->linkToRoute('theming.Theming.getLoginBackground'); $this->assertEquals($expected, $this->template->getBackground()); } @@ -406,6 +421,11 @@ class ThemingDefaultsTest extends TestCase { ->method('getAppValue') ->with('theming', 'logoMime') ->willReturn(''); + $this->appData + ->expects($this->once()) + ->method('getFolder') + ->with('images') + ->willThrowException(new \Exception()); $expected = $this->urlGenerator->imagePath('core','logo.svg'); $this->assertEquals($expected, $this->template->getLogo()); } @@ -416,6 +436,17 @@ class ThemingDefaultsTest extends TestCase { ->method('getAppValue') ->with('theming', 'logoMime') ->willReturn('image/svg+xml'); + $simpleFolder = $this->createMock(ISimpleFolder::class); + $this->appData + ->expects($this->once()) + ->method('getFolder') + ->with('images') + ->willReturn($simpleFolder); + $simpleFolder + ->expects($this->once()) + ->method('getFile') + ->with('logo') + ->willReturn(''); $expected = $this->urlGenerator->linkToRoute('theming.Theming.getLogo'); $this->assertEquals($expected, $this->template->getLogo()); } diff --git a/apps/twofactor_backupcodes/l10n/fi.js b/apps/twofactor_backupcodes/l10n/fi.js index 6bcf7f1ad82..866c6831fbe 100644 --- a/apps/twofactor_backupcodes/l10n/fi.js +++ b/apps/twofactor_backupcodes/l10n/fi.js @@ -11,7 +11,7 @@ OC.L10N.register( "An error occurred while generating your backup codes" : "Tapahtui virhe varakoodeja luotaessa", "Nextcloud backup codes" : "Nextcloud-varakoodit", "Two-factor authentication" : "Kaksivaiheinen tunnistautuminen", - "You successfully logged in using two-factor authentication (%1$s)" : "Kirjauduit onnistuneesti sisään käyttäen kaksivaiheista tunnistautumista (%1$s)", + "You successfully logged in using two-factor authentication (%1$s)" : "Kirjauduit onnistuneesti sisään kaksivaiheista tunnistautumista käyttäen (%1$s)", "A login attempt using two-factor authentication failed (%1$s)" : "Kirjautumisyritys kaksivaiheista tunnistautumista käyttäen epäonnistui (%1$s)", "You created two-factor backup codes for your account" : "Loit kaksivaiheisen tunnistautumisen varakoodit tilillesi", "Backup code" : "Varakoodi", diff --git a/apps/twofactor_backupcodes/l10n/fi.json b/apps/twofactor_backupcodes/l10n/fi.json index 6aa14e1f790..ae179cca8e3 100644 --- a/apps/twofactor_backupcodes/l10n/fi.json +++ b/apps/twofactor_backupcodes/l10n/fi.json @@ -9,7 +9,7 @@ "An error occurred while generating your backup codes" : "Tapahtui virhe varakoodeja luotaessa", "Nextcloud backup codes" : "Nextcloud-varakoodit", "Two-factor authentication" : "Kaksivaiheinen tunnistautuminen", - "You successfully logged in using two-factor authentication (%1$s)" : "Kirjauduit onnistuneesti sisään käyttäen kaksivaiheista tunnistautumista (%1$s)", + "You successfully logged in using two-factor authentication (%1$s)" : "Kirjauduit onnistuneesti sisään kaksivaiheista tunnistautumista käyttäen (%1$s)", "A login attempt using two-factor authentication failed (%1$s)" : "Kirjautumisyritys kaksivaiheista tunnistautumista käyttäen epäonnistui (%1$s)", "You created two-factor backup codes for your account" : "Loit kaksivaiheisen tunnistautumisen varakoodit tilillesi", "Backup code" : "Varakoodi", diff --git a/apps/user_ldap/l10n/es.js b/apps/user_ldap/l10n/es.js index bac5a78ae88..d5150aed137 100644 --- a/apps/user_ldap/l10n/es.js +++ b/apps/user_ldap/l10n/es.js @@ -148,8 +148,11 @@ OC.L10N.register( "(New password is sent as plain text to LDAP)" : "(La nueva contraseña se envía como texto plano a LDAP)", "Special Attributes" : "Atributos especiales", "Quota Field" : "Cuota", + "Leave empty for user's default quota. Otherwise, specify an LDAP/AD attribute." : "Deje vacío para la couta predeterminada del usuario. De otra manera, específique un atributo LDAP/AD.", "Quota Default" : "Cuota por defecto", + "Override default quota for LDAP users who do not have a quota set in the Quota Field." : "Sobre escribir la cuota predeterminada para usuarios LDAP que no tienen una cuota configurada en el campo Cuota.", "Email Field" : "E-mail", + "Set the user's email from their LDAP attribute. Leave it empty for default behaviour." : "Configurar el correo electrónico del usuario desde atributo LDAP. Déjelo vacío para comportamiento predeterminado.", "User Home Folder Naming Rule" : "Regla para la carpeta Home de usuario", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Vacío para el nombre de usuario (por defecto). En otro caso, especifique un atributo LDAP/AD.", "Internal Username" : "Nombre de usuario interno", diff --git a/apps/user_ldap/l10n/es.json b/apps/user_ldap/l10n/es.json index 55fc0ba08ef..dbb07c62b72 100644 --- a/apps/user_ldap/l10n/es.json +++ b/apps/user_ldap/l10n/es.json @@ -146,8 +146,11 @@ "(New password is sent as plain text to LDAP)" : "(La nueva contraseña se envía como texto plano a LDAP)", "Special Attributes" : "Atributos especiales", "Quota Field" : "Cuota", + "Leave empty for user's default quota. Otherwise, specify an LDAP/AD attribute." : "Deje vacío para la couta predeterminada del usuario. De otra manera, específique un atributo LDAP/AD.", "Quota Default" : "Cuota por defecto", + "Override default quota for LDAP users who do not have a quota set in the Quota Field." : "Sobre escribir la cuota predeterminada para usuarios LDAP que no tienen una cuota configurada en el campo Cuota.", "Email Field" : "E-mail", + "Set the user's email from their LDAP attribute. Leave it empty for default behaviour." : "Configurar el correo electrónico del usuario desde atributo LDAP. Déjelo vacío para comportamiento predeterminado.", "User Home Folder Naming Rule" : "Regla para la carpeta Home de usuario", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Vacío para el nombre de usuario (por defecto). En otro caso, especifique un atributo LDAP/AD.", "Internal Username" : "Nombre de usuario interno", diff --git a/apps/user_ldap/l10n/nl.js b/apps/user_ldap/l10n/nl.js index 46ab2130235..609103adf21 100644 --- a/apps/user_ldap/l10n/nl.js +++ b/apps/user_ldap/l10n/nl.js @@ -148,8 +148,11 @@ OC.L10N.register( "(New password is sent as plain text to LDAP)" : "(Nieuw wachtwoord is als leesbare tekst verstuurd naar LDAP)", "Special Attributes" : "Speciale attributen", "Quota Field" : "Quota veld", + "Leave empty for user's default quota. Otherwise, specify an LDAP/AD attribute." : "Laat leeg voor het standaard gebruikersquotum. Of specificeer een LDAP/AD attribuut.", "Quota Default" : "Quota standaard", + "Override default quota for LDAP users who do not have a quota set in the Quota Field." : "Overschrijf de standaardquota voor LDAP gebruikers waarvoor geen qutum hoeft de worden ingevuld in het Quotum veld.", "Email Field" : "E-mailveld", + "Set the user's email from their LDAP attribute. Leave it empty for default behaviour." : "Stel het e-mailadres van de gebruiker op het LDAP attribuut. Vul niets in voor de standaardwijze.", "User Home Folder Naming Rule" : "Gebruikers Home map naamgevingsregel", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Laat leeg voor de gebruikersnaam (standaard). Of specificeer een LDAP/AD attribuut.", "Internal Username" : "Interne gebruikersnaam", diff --git a/apps/user_ldap/l10n/nl.json b/apps/user_ldap/l10n/nl.json index 54d7929fab0..8548d0713cb 100644 --- a/apps/user_ldap/l10n/nl.json +++ b/apps/user_ldap/l10n/nl.json @@ -146,8 +146,11 @@ "(New password is sent as plain text to LDAP)" : "(Nieuw wachtwoord is als leesbare tekst verstuurd naar LDAP)", "Special Attributes" : "Speciale attributen", "Quota Field" : "Quota veld", + "Leave empty for user's default quota. Otherwise, specify an LDAP/AD attribute." : "Laat leeg voor het standaard gebruikersquotum. Of specificeer een LDAP/AD attribuut.", "Quota Default" : "Quota standaard", + "Override default quota for LDAP users who do not have a quota set in the Quota Field." : "Overschrijf de standaardquota voor LDAP gebruikers waarvoor geen qutum hoeft de worden ingevuld in het Quotum veld.", "Email Field" : "E-mailveld", + "Set the user's email from their LDAP attribute. Leave it empty for default behaviour." : "Stel het e-mailadres van de gebruiker op het LDAP attribuut. Vul niets in voor de standaardwijze.", "User Home Folder Naming Rule" : "Gebruikers Home map naamgevingsregel", "Leave empty for user name (default). Otherwise, specify an LDAP/AD attribute." : "Laat leeg voor de gebruikersnaam (standaard). Of specificeer een LDAP/AD attribuut.", "Internal Username" : "Interne gebruikersnaam", |