Merge pull request #7564 from aduffeck/ocm2

[full-ci] Wire ocm services
This commit is contained in:
Andre Duffeck
2023-10-24 14:12:09 +02:00
committed by GitHub
47 changed files with 1102 additions and 139 deletions
@@ -147,13 +147,10 @@ type Share struct {
Mtime *v1beta12.Timestamp `protobuf:"bytes,8,opt,name=mtime,proto3" json:"mtime,omitempty"`
// Optional.
// The expiration time of the share.
Expiration *v1beta12.Timestamp `protobuf:"bytes,9,opt,name=expiration,proto3" json:"expiration,omitempty"`
// Optional.
// Hide share, default false
Hide bool `protobuf:"varint,10,opt,name=hide,proto3" json:"hide,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Expiration *v1beta12.Timestamp `protobuf:"bytes,9,opt,name=expiration,proto3" json:"expiration,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Share) Reset() { *m = Share{} }
@@ -244,13 +241,6 @@ func (m *Share) GetExpiration() *v1beta12.Timestamp {
return nil
}
func (m *Share) GetHide() bool {
if m != nil {
return m.Hide
}
return false
}
// The permissions for a share.
type SharePermissions struct {
Permissions *v1beta1.ResourcePermissions `protobuf:"bytes,1,opt,name=permissions,proto3" json:"permissions,omitempty"`
@@ -304,10 +294,13 @@ type ReceivedShare struct {
State ShareState `protobuf:"varint,2,opt,name=state,proto3,enum=cs3.sharing.collaboration.v1beta1.ShareState" json:"state,omitempty"`
// REQUIRED.
// The mount point of the share.
MountPoint *v1beta1.Reference `protobuf:"bytes,3,opt,name=mount_point,json=mountPoint,proto3" json:"mount_point,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
MountPoint *v1beta1.Reference `protobuf:"bytes,3,opt,name=mount_point,json=mountPoint,proto3" json:"mount_point,omitempty"`
// Optional.
// Hide share, default false
Hidden bool `protobuf:"varint,4,opt,name=hidden,proto3" json:"hidden,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReceivedShare) Reset() { *m = ReceivedShare{} }
@@ -356,6 +349,13 @@ func (m *ReceivedShare) GetMountPoint() *v1beta1.Reference {
return nil
}
func (m *ReceivedShare) GetHidden() bool {
if m != nil {
return m.Hidden
}
return false
}
// Uniquely identifies a share in the share provider.
// A share MUST be uniquely identify by four (4) elements:
// 1) The share provider id
@@ -788,64 +788,64 @@ func init() {
}
var fileDescriptor_cb95b447da150104 = []byte{
// 933 bytes of a gzipped FileDescriptorProto
// 934 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0x4d, 0x6f, 0xe3, 0x44,
0x18, 0xc7, 0xe3, 0x24, 0x4e, 0xd2, 0x27, 0xbb, 0x95, 0x77, 0x28, 0xc2, 0xda, 0x05, 0x69, 0x6b,
0x69, 0xa1, 0xbb, 0x80, 0xa3, 0x34, 0x07, 0x04, 0x2c, 0xac, 0x12, 0xc7, 0x34, 0xa6, 0x55, 0x1a,
0x8d, 0xd3, 0xe5, 0x45, 0x95, 0x22, 0xd7, 0x1e, 0x52, 0x8b, 0xc6, 0x36, 0x63, 0xb7, 0x90, 0x33,
0x1f, 0x82, 0x13, 0x17, 0x8e, 0xdc, 0xf8, 0x1a, 0x5c, 0xb8, 0x71, 0xe4, 0xc0, 0x27, 0x41, 0xf3,
0xd8, 0xce, 0x9b, 0xb4, 0x5b, 0xb7, 0xe5, 0xe6, 0x99, 0xf9, 0xff, 0x9e, 0x79, 0xe6, 0x79, 0x93,
0xa1, 0xed, 0xc6, 0x9d, 0x56, 0x7c, 0xee, 0x70, 0x3f, 0x98, 0xb6, 0xdc, 0xf0, 0xe2, 0xc2, 0x39,
0x0b, 0xb9, 0x93, 0xf8, 0x61, 0x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1, 0xfc,
0xfa, 0x68, 0xf7, 0xb7, 0xf3, 0x0a, 0x4d, 0xc6, 0xe2, 0x9f, 0x6a, 0xac, 0x7c, 0x7b, 0x7f, 0x4d,
0x98, 0xe9, 0x7e, 0x2b, 0x57, 0x4c, 0xc7, 0xfc, 0xbd, 0xbc, 0x63, 0x26, 0x5d, 0xcc, 0x90, 0xb0,
0x68, 0xae, 0x59, 0x7c, 0xde, 0xe9, 0x0b, 0xe5, 0x5f, 0xa8, 0x39, 0xc9, 0x34, 0x27, 0x6b, 0x9a,
0x93, 0x4c, 0x73, 0x5a, 0xc3, 0x1f, 0xb8, 0xee, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x41, 0x35,
0x12, 0xf0, 0x90, 0x0a, 0x00, 0x00,
}
@@ -122,9 +122,20 @@ func (h *Handler) AcceptReceivedShare(w http.ResponseWriter, r *http.Request) {
// TODO we could delete shares here if the stat returns code NOT FOUND ... but listening for file deletes would be better
}
}
// we need to add a path to the share
receivedShare := &collaboration.ReceivedShare{
Share: &collaboration.Share{
Id: &collaboration.ShareId{OpaqueId: shareID},
},
State: collaboration.ShareState_SHARE_STATE_ACCEPTED,
MountPoint: &provider.Reference{
Path: mount,
},
}
updateMask := &fieldmaskpb.FieldMask{Paths: []string{"state", "hidden", "mount_point"}}
for id := range sharesToAccept {
data := h.updateReceivedShare(w, r, id, false, mount)
data := h.updateReceivedShare(w, r, receivedShare, updateMask)
// only render the data for the changed share
if id == shareID && data != nil {
response.WriteOCSSuccess(w, r, []*conversions.ShareData{data})
@@ -135,45 +146,69 @@ func (h *Handler) AcceptReceivedShare(w http.ResponseWriter, r *http.Request) {
// RejectReceivedShare handles DELETE Requests on /apps/files_sharing/api/v1/shares/{shareid}
func (h *Handler) RejectReceivedShare(w http.ResponseWriter, r *http.Request) {
shareID := chi.URLParam(r, "shareid")
data := h.updateReceivedShare(w, r, shareID, true, "")
// we need to add a path to the share
receivedShare := &collaboration.ReceivedShare{
Share: &collaboration.Share{
Id: &collaboration.ShareId{OpaqueId: shareID},
},
State: collaboration.ShareState_SHARE_STATE_REJECTED,
}
updateMask := &fieldmaskpb.FieldMask{Paths: []string{"state", "hidden"}}
data := h.updateReceivedShare(w, r, receivedShare, updateMask)
if data != nil {
response.WriteOCSSuccess(w, r, []*conversions.ShareData{data})
}
}
func (h *Handler) updateReceivedShare(w http.ResponseWriter, r *http.Request, shareID string, rejectShare bool, mountPoint string) *conversions.ShareData {
func (h *Handler) UpdateReceivedShare(w http.ResponseWriter, r *http.Request) {
shareID := chi.URLParam(r, "shareid")
hideFlag, _ := strconv.ParseBool(r.URL.Query().Get("hidden"))
// unfortunately we need to get the share first to read the state
client, err := h.getClient()
if err != nil {
response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error getting grpc gateway client", err)
return
}
// we need to add a path to the share
receivedShare := &collaboration.ReceivedShare{
Share: &collaboration.Share{
Id: &collaboration.ShareId{OpaqueId: shareID},
},
Hidden: hideFlag,
}
updateMask := &fieldmaskpb.FieldMask{Paths: []string{"state", "hidden"}}
rs, _ := getReceivedShareFromID(r.Context(), client, shareID)
if rs != nil && rs.Share != nil {
receivedShare.State = rs.Share.State
}
data := h.updateReceivedShare(w, r, receivedShare, updateMask)
if data != nil {
response.WriteOCSSuccess(w, r, []*conversions.ShareData{data})
}
// TODO: do we need error handling here?
}
func (h *Handler) updateReceivedShare(w http.ResponseWriter, r *http.Request, receivedShare *collaboration.ReceivedShare, fieldMask *fieldmaskpb.FieldMask) *conversions.ShareData {
ctx := r.Context()
logger := appctx.GetLogger(ctx)
updateShareRequest := &collaboration.UpdateReceivedShareRequest{
Share: receivedShare,
UpdateMask: fieldMask,
}
client, err := h.getClient()
if err != nil {
response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error getting grpc gateway client", err)
return nil
}
hideFlag, _ := strconv.ParseBool(r.URL.Query().Get("hide"))
// we need to add a path to the share
shareRequest := &collaboration.UpdateReceivedShareRequest{
Share: &collaboration.ReceivedShare{
Share: &collaboration.Share{
Id: &collaboration.ShareId{OpaqueId: shareID},
Hide: hideFlag,
},
MountPoint: &provider.Reference{
Path: mountPoint,
},
},
UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"state", "hide"}},
}
if rejectShare {
shareRequest.Share.State = collaboration.ShareState_SHARE_STATE_REJECTED
} else {
shareRequest.UpdateMask.Paths = append(shareRequest.UpdateMask.Paths, "mount_point")
shareRequest.Share.State = collaboration.ShareState_SHARE_STATE_ACCEPTED
}
shareRes, err := client.UpdateReceivedShare(ctx, shareRequest)
shareRes, err := client.UpdateReceivedShare(ctx, updateShareRequest)
if err != nil {
response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "grpc update received share request failed", err)
return nil
@@ -203,6 +238,7 @@ func (h *Handler) updateReceivedShare(w http.ResponseWriter, r *http.Request, sh
}
data.State = mapState(rs.GetState())
data.Hidden = rs.Hidden
h.addFileInfo(ctx, data, info)
h.mapUserIds(r.Context(), client, data)
@@ -580,9 +580,9 @@ func (h *Handler) GetShare(w http.ResponseWriter, r *http.Request) {
},
})
if err == nil && uRes.GetShare() != nil {
receivedshare = uRes.Share
resourceID = uRes.Share.Share.ResourceId
share, err = conversions.CS3Share2ShareData(ctx, uRes.Share.Share)
share.Hidden = uRes.Share.Hidden
if err != nil {
response.WriteOCSError(w, r, response.MetaServerError.StatusCode, "error mapping share data", err)
return
@@ -739,7 +739,7 @@ func (h *Handler) updateShare(w http.ResponseWriter, r *http.Request, share *col
share.Permissions = &collaboration.SharePermissions{Permissions: role.CS3ResourcePermissions()}
var fieldMaskPaths = []string{"permissions", "hide"}
var fieldMaskPaths = []string{"permissions"}
expireDate := r.PostFormValue("expireDate")
var expirationTs *types.Timestamp
@@ -958,7 +958,7 @@ func (h *Handler) listSharesWithMe(w http.ResponseWriter, r *http.Request) {
// TODO(refs) filter out "invalid" shares
for _, rs := range lrsRes.GetShares() {
if rs.Share.Hide && !showHidden {
if rs.Hidden && !showHidden {
continue
}
if stateFilter != ocsStateUnknown && rs.GetState() != stateFilter {
@@ -122,6 +122,7 @@ func (s *svc) routerInit(log *zerolog.Logger) error {
r.Route("/pending/{shareid}", func(r chi.Router) {
r.Post("/", sharesHandler.AcceptReceivedShare)
r.Delete("/", sharesHandler.RejectReceivedShare)
r.Put("/", sharesHandler.UpdateReceivedShare)
})
r.Route("/remote_shares", func(r chi.Router) {
r.Get("/", sharesHandler.ListFederatedShares)
+1 -2
View File
@@ -172,7 +172,7 @@ type ShareData struct {
Quicklink bool `json:"quicklink,omitempty" xml:"quicklink,omitempty"`
// PasswordProtected represents a public share is password protected
// PasswordProtected bool `json:"password_protected,omitempty" xml:"password_protected,omitempty"`
Hide bool `json:"hide" xml:"hide"`
Hidden bool `json:"hidden" xml:"hidden"`
}
// ShareeData holds share recipient search results
@@ -233,7 +233,6 @@ func CS3Share2ShareData(ctx context.Context, share *collaboration.Share) (*Share
// Displaynames are added later
UIDOwner: LocalUserIDToString(share.GetCreator()),
UIDFileOwner: LocalUserIDToString(share.GetOwner()),
Hide: share.Hide,
}
if share.Grantee.Type == provider.GranteeType_GRANTEE_TYPE_USER {
@@ -23,6 +23,7 @@ import (
"encoding/json"
"io"
"os"
"path/filepath"
"sync"
"time"
@@ -69,6 +70,9 @@ func New(m map[string]interface{}) (share.Repository, error) {
func loadOrCreate(file string) (*shareModel, error) {
_, err := os.Stat(file)
if os.IsNotExist(err) {
if err := os.MkdirAll(filepath.Dir(file), 0700); err != nil {
return nil, errors.Wrap(err, "error creating the base directory: "+filepath.Dir(file))
}
if err := os.WriteFile(file, []byte("{}"), 0700); err != nil {
return nil, errors.Wrap(err, "error creating the file: "+file)
}
+1 -1
View File
@@ -647,7 +647,7 @@ func (m *Manager) UpdateReceivedShare(ctx context.Context, rshare *collaboration
rs.State = rshare.State
case "mount_point":
rs.MountPoint = rshare.MountPoint
case "hide":
case "hidden":
continue
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
+1 -1
View File
@@ -403,7 +403,7 @@ func (m *mgr) UpdateShare(ctx context.Context, ref *collaboration.ShareReference
m.model.Shares[idx].Permissions = updated.Permissions
case "expiration":
m.model.Shares[idx].Expiration = updated.Expiration
case "hide":
case "hidden":
continue
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
+4 -6
View File
@@ -511,8 +511,6 @@ func (m *Manager) UpdateShare(ctx context.Context, ref *collaboration.ShareRefer
toUpdate.Permissions = updated.Permissions
case "expiration":
toUpdate.Expiration = updated.Expiration
case "hide":
toUpdate.Hide = updated.Hide
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
}
@@ -886,11 +884,11 @@ func (m *Manager) ListReceivedShares(ctx context.Context, filters []*collaborati
if share.IsGrantedToUser(s, user) {
if share.MatchesFiltersWithState(s, state.State, filters) {
s.Hide = state.Hide
rs := &collaboration.ReceivedShare{
Share: s,
State: state.State,
MountPoint: state.MountPoint,
Hidden: state.Hidden,
}
select {
case results <- rs:
@@ -942,7 +940,7 @@ func (m *Manager) convert(ctx context.Context, userID string, s *collaboration.S
if err == nil && state != nil {
rs.State = state.State
rs.MountPoint = state.MountPoint
rs.Share.Hide = state.Hide
rs.Hidden = state.Hidden
}
return rs
}
@@ -1007,8 +1005,8 @@ func (m *Manager) UpdateReceivedShare(ctx context.Context, receivedShare *collab
rs.State = receivedShare.State
case "mount_point":
rs.MountPoint = receivedShare.MountPoint
case "hide":
rs.Share.Hide = receivedShare.Share.Hide
case "hidden":
rs.Hidden = receivedShare.Hidden
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
}
@@ -68,7 +68,7 @@ type Space struct {
type State struct {
State collaboration.ShareState
MountPoint *provider.Reference
Hide bool
Hidden bool
}
// New returns a new Cache instance
@@ -118,7 +118,7 @@ func (c *Cache) Add(ctx context.Context, userID, spaceID string, rs *collaborati
receivedSpace.States[rs.Share.Id.GetOpaqueId()] = &State{
State: rs.State,
MountPoint: rs.MountPoint,
Hide: rs.Share.Hide,
Hidden: rs.Hidden,
}
return c.persist(ctx, userID)
@@ -200,7 +200,7 @@ func (c *Cache) List(ctx context.Context, userID string) (map[string]*Space, err
spaceCopy.States[shareID] = &State{
State: state.State,
MountPoint: state.MountPoint,
Hide: state.Hide,
Hidden: state.Hidden,
}
}
spaces[spaceID] = spaceCopy
+1 -3
View File
@@ -243,8 +243,6 @@ func (m *manager) UpdateShare(ctx context.Context, ref *collaboration.ShareRefer
m.shares[i].Permissions = updated.Permissions
case "expiration":
m.shares[i].Expiration = updated.Expiration
case "hide":
m.shares[i].Hide = updated.Hide
default:
return nil, errtypes.NotSupported("updating " + path + " is not supported")
}
@@ -366,7 +364,7 @@ func (m *manager) UpdateReceivedShare(ctx context.Context, receivedShare *collab
rs.State = receivedShare.State
case "mount_point":
rs.MountPoint = receivedShare.MountPoint
case "hide":
case "hidden":
continue
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")
@@ -454,7 +454,7 @@ func (m *mgr) UpdateReceivedShare(ctx context.Context, receivedShare *collaborat
fields = append(fields, "file_target=?")
rs.MountPoint = receivedShare.MountPoint
params = append(params, rs.MountPoint.Path)
case "hide":
case "hidden":
continue
default:
return nil, errtypes.NotSupported("updating " + fieldMask.Paths[i] + " is not supported")