Skip to content

Fix: admin group update logic

What does this MR do and why?

Contributes to #423509

Problem

The logic to convert repository size limit is defined on controller level and service level. It leads to a double convertion problem. Controller converts megabytes to bytes and then service repeats the process.

However, it's broken only for create group flow. Because the update group doesn't use a service.

Solution

  • Use Groups::UpdateService to update groups from Admin area
  • Remove byte convertion logic from controller

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. Enter administrator mode
  2. Go to Admin Area > Groups
  3. Press New Group button
  4. Set some value to Repository size limit (MiB) in Permissions and group features
  5. Press the "Create Group" button.
  6. Check on the "Edit Group" screen that the Repository size limit you set is 1048576 times the size of the group.

Screenshots: #423509

Edited by Vasilii Iakliushin

Merge request reports

Loading