nextcloud / nextcloud/circles

Implement storage pool / quota per group

Open
#2,896 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop design enhancement
Dominant language
JavaScript
Stars
177
Forks
68
Avg merge
2d 22h
Merged PRs (30d)
60

Description

Is your feature request related to a problem? Please describe.
Non-admin users can now create Team folders for an existing team, and the Teams app automatically creates team folders when a team is created.

A default quota is assigned, based on group membership of the person who created the Team folder.

But even if a default quota is low, unlimited creation of Team folders can cause issues. A total storage pool per group can fix that.

Use case

Department 'engineering' has a default quota of 25GB.
Department 'sales' has a default quota of 20GB.

The organization has a total of 1TB of storage reserved. When this storage is used, work blocks. The administrator wants to divide the storage allocation, so each department can distribute storage between their teams.

Solution

Department 'Engineering' gets a storage pool of 1TB, department sales gets a storage pool of 500GB.

When the total quota of the team folders of Engineering hits 1TB, creation of new Team folders should be blocked. This way, Engineering can never exceed their allocated storage, and neither can Sales.

Group storage pool

We set a total limit of the storage for all team folders in a certain group, acting as a shared storage pool.

This total limit, requires maintaining a link between the initial group and the Team.

We check on team (folder) creation and quota changes what the current usage of the group is and if the change exceeds the limits, we block it with a warning.

Admin UI

The admin can configure the group quotas in the admin section of the Teams app, in a table:

group default quota total storage
marketing 2gb 1tb
sales 10gb 500gb
engineering 5gb 2tb

Some details

  • We need to store the team-group relation in the database.
  • The total storage controls the pool for the group. The default quota is the max quota on individual Teamfolder.
  • If a user is in multiple groups that have a total storage pool quota, we should let the user pick the group the team belongs to. In most cases, there will probably not be any choice as this is likely set at a high level, per department for example.
  • When a group hits 90% usage of total quota, we should warn admins. When it hits 100%, members of the group won't be able to create new team folders anymore.
  • The team page should show, at least to team managers, their quota, group, and their pool usage.
  • The team admin page should allow changing the group membership of a team, to move the team quota to a different storage pool
  • Changing the quota on a Team should of course be checked against the quota of the total group storage pool the team belongs to.

note/question

We think that the relation with a group shouldn't imply the team being a member of the group - that comes with way more possible implications.

Admins can choose to simply assign existing groups they use for managing people in the organization a quota. If there are department groups, for example. Of course they can also create special groups just to manage quota.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Teams app's admin section, team page, and team admin page, then map the existing team-folder and group data model. The implementation needs persisted team-group relations, group pool and default quotas, usage checks on creation and quota changes, and warnings or blocking at 90% and 100%. Done means administrators can configure pools and managers can view and change the assigned pool without exceeding its limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, database, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.