Skip to content

Commit

Permalink
Merge branch 'fix/select-groups-display' of github.com:yannicklescure…
Browse files Browse the repository at this point in the history
…/nextcloud-server into fix/select-groups-display
  • Loading branch information
yannicklescure committed Oct 16, 2024
2 parents f69ab9d + e617917 commit b31cf10
Show file tree
Hide file tree
Showing 832 changed files with 6,656 additions and 4,298 deletions.
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Files: core/img/apps/richdocumentscode.svg
Copyright: 2016-2024 Collabora Ltd.
License: LicenseRef-CollaboraTrademarks

Files: core/img/twitter.svg core/img/actions/twitter.svg apps/federatedfilesharing/img/social-twitter.svg
Files: core/img/x.svg core/img/twitter.svg core/img/actions/twitter.svg apps/federatedfilesharing/img/social-twitter.svg
Copyright: X Corp.
License: LicenseRef-XTrademarks

Expand Down
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 484 files
48 changes: 5 additions & 43 deletions apps/admin_audit/lib/Actions/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@
namespace OCA\AdminAudit\Actions;

use OC\Files\Node\NonExistingFile;
use OCP\Files\Events\Node\BeforeNodeDeletedEvent;
use OCP\Files\Events\Node\BeforeNodeReadEvent;
use OCP\Files\Events\Node\BeforeNodeRenamedEvent;
use OCP\Files\Events\Node\BeforeNodeWrittenEvent;
use OCP\Files\Events\Node\NodeCopiedEvent;
use OCP\Files\Events\Node\NodeCreatedEvent;
use OCP\Files\Events\Node\NodeDeletedEvent;
use OCP\Files\Events\Node\NodeRenamedEvent;
use OCP\Files\Events\Node\NodeWrittenEvent;
use OCP\Files\InvalidPathException;
Expand All @@ -28,10 +27,9 @@
class Files extends Action {

private array $renamedNodes = [];

/**
* Logs file read actions
*
* @param BeforeNodeReadEvent $event
*/
public function read(BeforeNodeReadEvent $event): void {
try {
Expand All @@ -55,8 +53,6 @@ public function read(BeforeNodeReadEvent $event): void {

/**
* Logs rename actions of files
*
* @param BeforeNodeRenamedEvent $event
*/
public function beforeRename(BeforeNodeRenamedEvent $event): void {
try {
Expand All @@ -72,8 +68,6 @@ public function beforeRename(BeforeNodeRenamedEvent $event): void {

/**
* Logs rename actions of files
*
* @param NodeRenamedEvent $event
*/
public function afterRename(NodeRenamedEvent $event): void {
try {
Expand Down Expand Up @@ -101,8 +95,6 @@ public function afterRename(NodeRenamedEvent $event): void {

/**
* Logs creation of files
*
* @param NodeCreatedEvent $event
*/
public function create(NodeCreatedEvent $event): void {
try {
Expand All @@ -128,8 +120,6 @@ public function create(NodeCreatedEvent $event): void {

/**
* Logs copying of files
*
* @param NodeCopiedEvent $event
*/
public function copy(NodeCopiedEvent $event): void {
try {
Expand All @@ -154,14 +144,12 @@ public function copy(NodeCopiedEvent $event): void {

/**
* Logs writing of files
*
* @param BeforeNodeWrittenEvent $event
*/
public function write(BeforeNodeWrittenEvent $event): void {
public function write(NodeWrittenEvent $event): void {
$node = $event->getNode();
try {
$params = [
'id' => $node instanceof NonExistingFile ? null : $node->getId(),
'id' => $node->getId(),
'path' => mb_substr($node->getInternalPath(), 5),
];
} catch (InvalidPathException|NotFoundException $e) {
Expand All @@ -181,36 +169,10 @@ public function write(BeforeNodeWrittenEvent $event): void {
);
}

/**
* Logs update of files
*
* @param NodeWrittenEvent $event
*/
public function update(NodeWrittenEvent $event): void {
try {
$params = [
'id' => $event->getNode()->getId(),
'path' => mb_substr($event->getNode()->getInternalPath(), 5),
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file update: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
$this->log(
'File with id "%s" updated: "%s"',
$params,
array_keys($params)
);
}

/**
* Logs deletions of files
*
* @param NodeDeletedEvent $event
*/
public function delete(NodeDeletedEvent $event): void {
public function delete(BeforeNodeDeletedEvent $event): void {
try {
$params = [
'id' => $event->getNode()->getId(),
Expand Down
16 changes: 4 additions & 12 deletions apps/admin_audit/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@
use OCP\Authentication\TwoFactorAuth\TwoFactorProviderChallengePassed;
use OCP\Console\ConsoleEvent;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Events\Node\BeforeNodeDeletedEvent;
use OCP\Files\Events\Node\BeforeNodeReadEvent;
use OCP\Files\Events\Node\BeforeNodeRenamedEvent;
use OCP\Files\Events\Node\BeforeNodeWrittenEvent;
use OCP\Files\Events\Node\NodeCopiedEvent;
use OCP\Files\Events\Node\NodeCreatedEvent;
use OCP\Files\Events\Node\NodeDeletedEvent;
use OCP\Files\Events\Node\NodeRenamedEvent;
use OCP\Files\Events\Node\NodeWrittenEvent;
use OCP\Group\Events\GroupCreatedEvent;
Expand Down Expand Up @@ -194,17 +193,10 @@ function (NodeCopiedEvent $event) use ($fileActions): void {
}
);

$eventDispatcher->addListener(
BeforeNodeWrittenEvent::class,
function (BeforeNodeWrittenEvent $event) use ($fileActions): void {
$fileActions->write($event);
}
);

$eventDispatcher->addListener(
NodeWrittenEvent::class,
function (NodeWrittenEvent $event) use ($fileActions): void {
$fileActions->update($event);
$fileActions->write($event);
}
);

Expand All @@ -216,8 +208,8 @@ function (BeforeNodeReadEvent $event) use ($fileActions): void {
);

$eventDispatcher->addListener(
NodeDeletedEvent::class,
function (NodeDeletedEvent $event) use ($fileActions): void {
BeforeNodeDeletedEvent::class,
function (BeforeNodeDeletedEvent $event) use ($fileActions): void {
$fileActions->delete($event);
}
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php

declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\AdminAudit\Tests\Actions;

use OCA\AdminAudit\IAuditLogger;
use OCA\AdminAudit\Listener\UserManagementEventListener;
use OCP\IUser;
use OCP\User\Events\UserChangedEvent;
use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;

class UserManagementEventListenerTest extends TestCase {
private IAuditLogger&MockObject $logger;

private UserManagementEventListener $listener;

private MockObject&IUser $user;

protected function setUp(): void {
parent::setUp();

$this->logger = $this->createMock(IAuditLogger::class);
$this->listener = new UserManagementEventListener($this->logger);

$this->user = $this->createMock(IUser::class);
$this->user->method('getUID')->willReturn('alice');
$this->user->method('getDisplayName')->willReturn('Alice');
}

public function testSkipUnsupported(): void {
$this->logger->expects($this->never())
->method('info');

$event = new UserChangedEvent(
$this->user,
'unsupported',
'value',
);

$this->listener->handle($event);
}

public function testUserEnabled(): void {
$this->logger->expects($this->once())
->method('info')
->with('User enabled: "alice"', ['app' => 'admin_audit']);

$event = new UserChangedEvent(
$this->user,
'enabled',
true,
false,
);

$this->listener->handle($event);
}

public function testUserDisabled(): void {
$this->logger->expects($this->once())
->method('info')
->with('User disabled: "alice"', ['app' => 'admin_audit']);

$event = new UserChangedEvent(
$this->user,
'enabled',
false,
true,
);

$this->listener->handle($event);
}

public function testEmailChanged(): void {
$this->logger->expects($this->once())
->method('info')
->with('Email address changed for user alice', ['app' => 'admin_audit']);

$event = new UserChangedEvent(
$this->user,
'eMailAddress',
'alice@alice.com',
'',
);

$this->listener->handle($event);
}
}
4 changes: 2 additions & 2 deletions apps/comments/l10n/ar.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ OC.L10N.register(
"New comment" : "تعليق جديد",
"Write a comment …" : "أكتُب تعليق ...",
"Post comment" : "أضف تعليق",
"@ for mentions, : for emoji, / for smart picker" : "@ للإشارات، : للإيموجي، / للاقط الذكي",
"@ for mentions, : for emoji, / for smart picker" : "@ للإشارات : للإيموجي / للاقط الذكي",
"Could not reload comments" : "تعذّرت إعادة تحميل التعليقات",
"No comments yet, start the conversation!" : "لا توجد تعليقات, ابدأ النقاش الآن!",
"No more messages" : "لامزيد من الرسائل",
"Retry" : "أعد المحاولة",
"Failed to mark comments as read" : "إخفاق في تعيين ملاحظات كمقرؤة",
"Failed to mark comments as read" : "فشل في تعيين ملاحظات كمقرؤة",
"Unable to load the comments list" : "تعذر تحميل قائمة التعليقات",
"_1 new comment_::_{unread} new comments_" : ["1 تعليق جديد","1 تعليق جديد","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة"],
"Comment" : "تعليق",
Expand Down
4 changes: 2 additions & 2 deletions apps/comments/l10n/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"New comment" : "تعليق جديد",
"Write a comment …" : "أكتُب تعليق ...",
"Post comment" : "أضف تعليق",
"@ for mentions, : for emoji, / for smart picker" : "@ للإشارات، : للإيموجي، / للاقط الذكي",
"@ for mentions, : for emoji, / for smart picker" : "@ للإشارات : للإيموجي / للاقط الذكي",
"Could not reload comments" : "تعذّرت إعادة تحميل التعليقات",
"No comments yet, start the conversation!" : "لا توجد تعليقات, ابدأ النقاش الآن!",
"No more messages" : "لامزيد من الرسائل",
"Retry" : "أعد المحاولة",
"Failed to mark comments as read" : "إخفاق في تعيين ملاحظات كمقرؤة",
"Failed to mark comments as read" : "فشل في تعيين ملاحظات كمقرؤة",
"Unable to load the comments list" : "تعذر تحميل قائمة التعليقات",
"_1 new comment_::_{unread} new comments_" : ["1 تعليق جديد","1 تعليق جديد","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة","{unread} تعليقات جديدة"],
"Comment" : "تعليق",
Expand Down
1 change: 1 addition & 0 deletions apps/comments/l10n/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ OC.L10N.register(
"{author} commented on {file}" : "{author} okomentoval(a) {file}",
"<strong>Comments</strong> for files" : "<strong>Komentáře</strong> k souborům",
"Files" : "Soubory",
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "Byli jste zmíněni u souboru „{file}“, v komentáři od účtu, který byl později smazán",
"{user} mentioned you in a comment on \"{file}\"" : "{user} vás zmínil(a) v komentáři u „{file}“",
"Files app plugin to add comments to files" : "Zásuvný modul do aplikace Soubory pro přidávání komentářů k souborům",
"Edit comment" : "Upravit komentář",
Expand Down
1 change: 1 addition & 0 deletions apps/comments/l10n/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"{author} commented on {file}" : "{author} okomentoval(a) {file}",
"<strong>Comments</strong> for files" : "<strong>Komentáře</strong> k souborům",
"Files" : "Soubory",
"You were mentioned on \"{file}\", in a comment by an account that has since been deleted" : "Byli jste zmíněni u souboru „{file}“, v komentáři od účtu, který byl později smazán",
"{user} mentioned you in a comment on \"{file}\"" : "{user} vás zmínil(a) v komentáři u „{file}“",
"Files app plugin to add comments to files" : "Zásuvný modul do aplikace Soubory pro přidávání komentářů k souborům",
"Edit comment" : "Upravit komentář",
Expand Down
2 changes: 2 additions & 0 deletions apps/contactsinteraction/l10n/cs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ OC.L10N.register(
{
"Recently contacted" : "Nedávno kontaktovaní",
"Contacts Interaction" : "Interakce s kontakty",
"Manages interaction between accounts and contacts" : "Spravuje interakci mezi účty a kontakty",
"Collect data about accounts and contacts interactions and provide an address book for the data" : "Shromažďuje data o interakcích mezi účty a kontakty a poskytuje pro tato data adresář kontaktů",
"Manages interaction between users and contacts" : "Spravuje interakci mezi uživateli a kontakty",
"Collect data about user and contacts interactions and provide an address book for the data" : "Shromažďuje data o interakcích mezi uživatelem a kontakty a poskytuje pro tato data adresář kontaktů"
},
Expand Down
2 changes: 2 additions & 0 deletions apps/contactsinteraction/l10n/cs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ "translations": {
"Recently contacted" : "Nedávno kontaktovaní",
"Contacts Interaction" : "Interakce s kontakty",
"Manages interaction between accounts and contacts" : "Spravuje interakci mezi účty a kontakty",
"Collect data about accounts and contacts interactions and provide an address book for the data" : "Shromažďuje data o interakcích mezi účty a kontakty a poskytuje pro tato data adresář kontaktů",
"Manages interaction between users and contacts" : "Spravuje interakci mezi uživateli a kontakty",
"Collect data about user and contacts interactions and provide an address book for the data" : "Shromažďuje data o interakcích mezi uživatelem a kontakty a poskytuje pro tato data adresář kontaktů"
},"pluralForm" :"nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;"
Expand Down
3 changes: 1 addition & 2 deletions apps/contactsinteraction/lib/BackgroundJob/CleanupJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

use OCA\ContactsInteraction\Db\RecentContactMapper;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\TimedJob;

class CleanupJob extends TimedJob {
Expand All @@ -22,7 +21,7 @@ public function __construct(
parent::__construct($time);

$this->setInterval(24 * 60 * 60);
$this->setTimeSensitivity(IJob::TIME_INSENSITIVE);
$this->setTimeSensitivity(self::TIME_INSENSITIVE);

}

Expand Down
6 changes: 3 additions & 3 deletions apps/dashboard/l10n/ar.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
OC.L10N.register(
"dashboard",
{
"Dashboard" : "لوحة التحكم",
"Dashboard" : "الرئيسية",
"Dashboard app" : "تطبيق الصفحة الرئيسية",
"Start your day informed\n\nThe Nextcloud Dashboard is your starting point of the day, giving you an overview of your upcoming appointments, urgent emails, chat messages, incoming tickets, latest tweets and much more! People can add the widgets they like and change the background to their liking." : "ابدأ يومك على اطِّلاع. \n\nتُعدُّ لوحة المعلومات dashboard في نكست كلاود هي نقطة البداية لليوم. إذ هي تُوفِّر لك نظرة عامة على مواعيدك القادمة و رسائل بريدك العاجلة و رسائل الدردشة و التذاكر الواردة و أحدث التغريدات و غير ذلك الكثير! يُمكِن للمستخدِم إضافة الأدوات التي يحبها و تغيير الخلفية حسب رغبته.",
"\"{title} icon\"" : "\"{title} أيقونة\"",
"Customize" : "تعديل",
"Edit widgets" : "تعديل الودجات",
"Edit widgets" : "تعديل أدوات الصفحة الرئيسية",
"Get more widgets from the App Store" : "يمكنك الحصول على المزيد من الأدوات من متجر التطبيقات",
"Weather service" : "خدمة الطقس",
"For your privacy, the weather data is requested by your Nextcloud server on your behalf so the weather service receives no personal information." : "للحفاظ على خصوصيتك، يتم استدعاء بيانات حالة الطقس عبر خادم NextCloud الخاص بك نيابه عنك، وبالتالي فإن خدمة حالة الطقس لا تشارك معلوماتك الشخصية.",
Expand All @@ -21,7 +21,7 @@ OC.L10N.register(
"Good afternoon, {name}" : "مساء الخير، {name}",
"Good evening" : "مساء الخير",
"Good evening, {name}" : "مساء الخير، {name}",
"Hello" : "مرحبا",
"Hello" : "مرحباً",
"Hello, {name}" : "أهلا، {name} ",
"Start your day informed\n\nThe Nextcloud Dashboard is your starting point of the day, giving you an overview of your upcoming appointments, urgent emails, chat messages, incoming tickets, latest tweets and much more! Users can add the widgets they like and change the background to their liking." : "إبدأ يومك بالاطلاع على ما يهمّك\n\nلوحة قيادة نكست كلاود هي نقطة البداية ليومك؛\nتعطيك لمحة عن مواعيدك القادمة و الرسائل المستعجلة و المحادثات الواردة و تذاكر طلب المساعدة المعلقة و آخر التغريدات و الكثير غيرها!\nيمكنك أن تضيف أدوات أخرى ترغبها\nكما يمكنك تغيير مظهر و خلفية اللوحة كما تريد. "
},
Expand Down
6 changes: 3 additions & 3 deletions apps/dashboard/l10n/ar.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ "translations": {
"Dashboard" : "لوحة التحكم",
"Dashboard" : "الرئيسية",
"Dashboard app" : "تطبيق الصفحة الرئيسية",
"Start your day informed\n\nThe Nextcloud Dashboard is your starting point of the day, giving you an overview of your upcoming appointments, urgent emails, chat messages, incoming tickets, latest tweets and much more! People can add the widgets they like and change the background to their liking." : "ابدأ يومك على اطِّلاع. \n\nتُعدُّ لوحة المعلومات dashboard في نكست كلاود هي نقطة البداية لليوم. إذ هي تُوفِّر لك نظرة عامة على مواعيدك القادمة و رسائل بريدك العاجلة و رسائل الدردشة و التذاكر الواردة و أحدث التغريدات و غير ذلك الكثير! يُمكِن للمستخدِم إضافة الأدوات التي يحبها و تغيير الخلفية حسب رغبته.",
"\"{title} icon\"" : "\"{title} أيقونة\"",
"Customize" : "تعديل",
"Edit widgets" : "تعديل الودجات",
"Edit widgets" : "تعديل أدوات الصفحة الرئيسية",
"Get more widgets from the App Store" : "يمكنك الحصول على المزيد من الأدوات من متجر التطبيقات",
"Weather service" : "خدمة الطقس",
"For your privacy, the weather data is requested by your Nextcloud server on your behalf so the weather service receives no personal information." : "للحفاظ على خصوصيتك، يتم استدعاء بيانات حالة الطقس عبر خادم NextCloud الخاص بك نيابه عنك، وبالتالي فإن خدمة حالة الطقس لا تشارك معلوماتك الشخصية.",
Expand All @@ -19,7 +19,7 @@
"Good afternoon, {name}" : "مساء الخير، {name}",
"Good evening" : "مساء الخير",
"Good evening, {name}" : "مساء الخير، {name}",
"Hello" : "مرحبا",
"Hello" : "مرحباً",
"Hello, {name}" : "أهلا، {name} ",
"Start your day informed\n\nThe Nextcloud Dashboard is your starting point of the day, giving you an overview of your upcoming appointments, urgent emails, chat messages, incoming tickets, latest tweets and much more! Users can add the widgets they like and change the background to their liking." : "إبدأ يومك بالاطلاع على ما يهمّك\n\nلوحة قيادة نكست كلاود هي نقطة البداية ليومك؛\nتعطيك لمحة عن مواعيدك القادمة و الرسائل المستعجلة و المحادثات الواردة و تذاكر طلب المساعدة المعلقة و آخر التغريدات و الكثير غيرها!\nيمكنك أن تضيف أدوات أخرى ترغبها\nكما يمكنك تغيير مظهر و خلفية اللوحة كما تريد. "
},"pluralForm" :"nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;"
Expand Down
Loading

0 comments on commit b31cf10

Please sign in to comment.