Skip to content

[CUSTOMER] List users with quota exception #1984

@chibenwa

Description

@chibenwa

Why

As part of a contract we allow user to create quota exceptions for his users and need to bill him for it.

How

Webadmin endpoint in twake mail that list users with specific quota

What

GET /quota/users?hasSpecificQuota

[
   {"user": "[email protected]", "storageLimit": 23878235, "countLimit" null},
   {"user":"[email protected], "storageLimit": 23878235, "countLimit" null}
...
]

Lists users with specific quota.

GET /quota/users/count?hasSpecificQuota

36

returns the total count of users that has specific quota

GET /quota/users/sum?hasSpecificQuota

{"storageLimit": 23878235, "countLimit" null}

Returns the sum of allocated extra quota (for each user max(0, userQuota - domainQuota)

How

Write an interface UserQuotaReporter in tmail-backend/data/data-extra-api

Write implementation for Cassandra and Postgres reading if needed directly the concerned tables.

Regarding memory I suggest to implement a minimalistic implem to pass the tests (abstract method in test to add records in UserQuotaReporter in a per-implem specific way?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions