summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2025-02-28 08:51:17 +0100
committernextcloud-command <nextcloud-command@users.noreply.github.com>2025-03-05 13:05:47 +0000
commitb6a22a7ace7051b99a25cc15dec3c59ec1d7c978 (patch)
treed5407bb04141327817ac2108ff754e4e03177c3f /apps
parentb88e3b730f5cbd3ad6506e5f975ef171c2bb3da4 (diff)
downloadnextcloud-server-b6a22a7ace7051b99a25cc15dec3c59ec1d7c978.tar.gz
nextcloud-server-b6a22a7ace7051b99a25cc15dec3c59ec1d7c978.zip
fix(dav): Use IUser::getDisplayName directlybackport/51258/stable31
No need to send this from the client. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Controller/OutOfOfficeController.php6
-rw-r--r--apps/dav/openapi.json5
-rw-r--r--apps/dav/src/components/AbsenceForm.vue1
3 files changed, 2 insertions, 10 deletions
diff --git a/apps/dav/lib/Controller/OutOfOfficeController.php b/apps/dav/lib/Controller/OutOfOfficeController.php
index 576c2acedfa..d3516d092e8 100644
--- a/apps/dav/lib/Controller/OutOfOfficeController.php
+++ b/apps/dav/lib/Controller/OutOfOfficeController.php
@@ -107,7 +107,6 @@ class OutOfOfficeController extends OCSController {
* @param string $status Short text that is set as user status during the absence
* @param string $message Longer multiline message that is shown to others during the absence
* @param ?string $replacementUserId User id of the replacement user
- * @param ?string $replacementUserDisplayName Display name of the replacement user
* @return DataResponse<Http::STATUS_OK, DAVOutOfOfficeData, array{}>|DataResponse<Http::STATUS_BAD_REQUEST, array{error: 'firstDay'|'statusLength'}, array{}>|DataResponse<Http::STATUS_UNAUTHORIZED, null, array{}>|DataResponse<Http::STATUS_NOT_FOUND, null, array{}>
*
* 200: Absence data
@@ -122,8 +121,6 @@ class OutOfOfficeController extends OCSController {
string $status,
string $message,
?string $replacementUserId,
- ?string $replacementUserDisplayName,
-
): DataResponse {
$user = $this->userSession?->getUser();
if ($user === null) {
@@ -133,6 +130,7 @@ class OutOfOfficeController extends OCSController {
return new DataResponse(['error' => 'statusLength'], Http::STATUS_BAD_REQUEST);
}
+ $replacementUser = null;
if ($replacementUserId !== null) {
$replacementUser = $this->userManager->get($replacementUserId);
if ($replacementUser === null) {
@@ -153,7 +151,7 @@ class OutOfOfficeController extends OCSController {
$status,
$message,
$replacementUserId,
- $replacementUserDisplayName
+ $replacementUser?->getDisplayName()
);
$this->coordinator->clearCache($user->getUID());
diff --git a/apps/dav/openapi.json b/apps/dav/openapi.json
index 98d5007e376..449ae09dff1 100644
--- a/apps/dav/openapi.json
+++ b/apps/dav/openapi.json
@@ -730,11 +730,6 @@
"type": "string",
"nullable": true,
"description": "User id of the replacement user"
- },
- "replacementUserDisplayName": {
- "type": "string",
- "nullable": true,
- "description": "Display name of the replacement user"
}
}
}
diff --git a/apps/dav/src/components/AbsenceForm.vue b/apps/dav/src/components/AbsenceForm.vue
index 2e2dff8551e..2e87390b60b 100644
--- a/apps/dav/src/components/AbsenceForm.vue
+++ b/apps/dav/src/components/AbsenceForm.vue
@@ -220,7 +220,6 @@ export default {
status: this.status,
message: this.message,
replacementUserId: this.replacementUser?.user ?? null,
- replacementUserDisplayName: this.replacementUser?.displayName ?? null,
})
showSuccess(this.$t('dav', 'Absence saved'))
} catch (error) {