Skip to content

Conversation

@fschade
Copy link
Contributor

@fschade fschade commented May 30, 2025

…ecial characters in name

Description

Under certain circumstances, it was not possible to change the user space quota. For example, it failed if the username contained special characters...

The error occurred because Web had always sent the username when changing the quota... In the end, it all comes down to the fact that the wrong interface was used in the client, which required a name

Related Issue

How Has This Been Tested?

  • local installation

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

Copilot AI review requested due to automatic review settings May 30, 2025 14:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the issue of updating a user's space quota when their username contains special characters by switching to the correct update interface.

  • Updated the type for the updateDrive function from Drive to DriveUpdate in the web-client.
  • Removed the unnecessary and problematic drive name from the update payload in the admin settings EditPanel.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/web-client/src/graph/drives/types.ts Updated import and argument type for updateDrive to use DriveUpdate, ensuring proper request payload formation.
packages/web-app-admin-settings/src/components/Users/SideBar/EditPanel.vue Removed the drive name from the update call, resolving payload issues with special characters.
Comments suppressed due to low confidence (2)

packages/web-app-admin-settings/src/components/Users/SideBar/EditPanel.vue:232

  • Removing the drive name from the update payload corrects the usage of the updateDrive interface; verify that no dependent logic still relies on the drive name in this context.
name: editUser.drive.name,

packages/web-client/src/graph/drives/types.ts:18

  • Confirm that the DriveUpdate interface includes all necessary fields required for the updateDrive operation to ensure data integrity.
data: DriveUpdate,

@fschade
Copy link
Contributor Author

fschade commented May 30, 2025

@AlexAndBear please have a look, its not clear to me if onUpdateUserDrive should take care of multiple property updates or just the quota as the condition indicates ... if (!isEqual(user.drive?.quota?.total, editUser.drive?.quota?.total)) { ...

@AlexAndBear
Copy link
Contributor

AlexAndBear commented May 30, 2025

Totally fine here, we only update the quota if it comes down to drives in this view.

Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@fschade fschade merged commit 2c95347 into opencloud-eu:main Jun 2, 2025
19 checks passed
@openclouders openclouders mentioned this pull request Jun 2, 2025
1 task
@openclouders openclouders mentioned this pull request Jun 2, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User-quota not changeable if users "First and last name"-field contains one of this characters [/ \ . : ? * " > < |]

3 participants