mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-24 22:19:09 -05:00
Fix error on missing permissions for GetBundle
This commit is contained in:
@@ -2,6 +2,7 @@ package svc
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
merrors "github.com/micro/go-micro/v2/errors"
|
||||
@@ -75,6 +76,7 @@ func (g Service) GetBundle(c context.Context, req *proto.GetBundleRequest, res *
|
||||
roleIDs := g.getRoleIDs(c, accountUUID)
|
||||
filteredBundle := g.getFilteredBundle(roleIDs, bundle)
|
||||
if len(filteredBundle.Settings) == 0 {
|
||||
err = fmt.Errorf("could not read bundle: %v", req.BundleId)
|
||||
return merrors.NotFound("ocis-settings", "%s", err)
|
||||
}
|
||||
res.Bundle = filteredBundle
|
||||
|
||||
@@ -73,7 +73,7 @@ func (s Store) ReadSetting(settingID string) (*proto.Setting, error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil, fmt.Errorf(settingID, fmt.Sprintf("could not read setting: %v", settingID))
|
||||
return nil, fmt.Errorf("could not read setting: %v", settingID)
|
||||
}
|
||||
|
||||
// WriteBundle writes the given record into a file within the dataPath.
|
||||
|
||||
Reference in New Issue
Block a user