remove quote from api response in share jails

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2023-05-15 17:01:58 +02:00
parent 82b64b2dde
commit 8cf35ba18e
2 changed files with 15 additions and 4 deletions
@@ -0,0 +1,7 @@
Enhancement: Remove quota from share jails api responses
We have removed the quota object from api responses for share jails,
which would permanently show exceeded due to restrictions in the permission system.
https://github.com/owncloud/ocis/pull/6309
https://github.com/owncloud/ocis/issues/4472
+8 -4
View File
@@ -538,10 +538,14 @@ func (g Graph) formatDrives(ctx context.Context, baseURL *url.URL, storageSpaces
// can't access disabled space
if utils.ReadPlainFromOpaque(storageSpace.Opaque, "trashed") != _spaceStateTrashed {
res.Special = g.getSpecialDriveItems(ctx, baseURL, storageSpace)
quota, err := g.getDriveQuota(ctx, storageSpace)
res.Quota = &quota
if err != nil {
return err
if storageSpace.SpaceType != "mountpoint" && storageSpace.SpaceType != "virtual" {
quota, err := g.getDriveQuota(ctx, storageSpace)
res.Quota = &quota
if err != nil {
return err
}
} else {
res.Quota = nil
}
}
select {