Merge pull request #6309 from dragonchaser/issue-4472-shared-jail-quote-api

remove quote from api response in share jails
This commit is contained in:
Christian Richter
2023-05-17 08:16:51 +02:00
committed by GitHub
2 changed files with 15 additions and 4 deletions

View File

@@ -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

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 {