Loading patches/036-user-config-change-event.patch +74 −0 Original line number Diff line number Diff line Loading @@ -57,3 +57,77 @@ 'OCP\\User\\GetQuotaEvent' => $baseDir . '/lib/public/User/GetQuotaEvent.php', 'OCP\\Util' => $baseDir . '/lib/public/Util.php', 'OCP\\WorkflowEngine\\EntityContext\\IContextPortation' => $baseDir . '/lib/public/WorkflowEngine/EntityContext/IContextPortation.php', --- /dev/null 2024-04-16 13:44:50 +++ ./lib/public/User/Events/UserConfigChangedEvent.php 2024-04-16 13:43:17 @@ -0,0 +1,69 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2023 Murena SAS <akhil.potukuchi.ext@murena.com> + * + * @author Murena SAS <akhil.potukuchi.ext@murena.com> + * + * @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 OCP\User\Events; + +use OCP\EventDispatcher\Event; + +class UserConfigChangedEvent extends Event { + private string $userId; + private string $appId; + private string $key; + private mixed $value; + private mixed $oldValue; + + public function __construct(string $userId, + string $appId, + string $key, + mixed $value, + mixed $oldValue = null) { + parent::__construct(); + $this->userId = $userId; + $this->appId = $appId; + $this->key = $key; + $this->value = $value; + $this->oldValue = $oldValue; + } + + public function getUserId(): string { + return $this->userId; + } + + public function getAppId(): string { + return $this->appId; + } + public function getKey(): string { + return $this->key; + } + + public function getValue() { + return $this->value; + } + + public function getOldValue() { + return $this->oldValue; + } +} Loading
patches/036-user-config-change-event.patch +74 −0 Original line number Diff line number Diff line Loading @@ -57,3 +57,77 @@ 'OCP\\User\\GetQuotaEvent' => $baseDir . '/lib/public/User/GetQuotaEvent.php', 'OCP\\Util' => $baseDir . '/lib/public/Util.php', 'OCP\\WorkflowEngine\\EntityContext\\IContextPortation' => $baseDir . '/lib/public/WorkflowEngine/EntityContext/IContextPortation.php', --- /dev/null 2024-04-16 13:44:50 +++ ./lib/public/User/Events/UserConfigChangedEvent.php 2024-04-16 13:43:17 @@ -0,0 +1,69 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2023 Murena SAS <akhil.potukuchi.ext@murena.com> + * + * @author Murena SAS <akhil.potukuchi.ext@murena.com> + * + * @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 OCP\User\Events; + +use OCP\EventDispatcher\Event; + +class UserConfigChangedEvent extends Event { + private string $userId; + private string $appId; + private string $key; + private mixed $value; + private mixed $oldValue; + + public function __construct(string $userId, + string $appId, + string $key, + mixed $value, + mixed $oldValue = null) { + parent::__construct(); + $this->userId = $userId; + $this->appId = $appId; + $this->key = $key; + $this->value = $value; + $this->oldValue = $oldValue; + } + + public function getUserId(): string { + return $this->userId; + } + + public function getAppId(): string { + return $this->appId; + } + public function getKey(): string { + return $this->key; + } + + public function getValue() { + return $this->value; + } + + public function getOldValue() { + return $this->oldValue; + } +}