SURFnet / rd-sram-integration

Research Drive / SURF Research Access Management Integration
2 stars 3 forks source link

OCM notification handling is not working appropriately on sender (OC1) side. #154

Closed shokri-navid closed 1 year ago

shokri-navid commented 1 year ago

When we share a file with mixGroupProvider share_type is set to 'local gourp' and an OCM invite API call will be done. this API call will create an entry with share_type 'remoute group' on (OC2). :information_source:

when receiver try to accept the incoming share it try to send an ocm notification to (OC1) with type: NOTIFICATION_TYPE_SHARE_ACCEPTED but sender (OC1) cannot find the shared file because is expect the share_type should be group. @yasharpm have you any suggestion?

yasharpm commented 1 year ago

I think you should extend FederatedGroupShareProvider from the OCM app and override the function getShareById in order to also look for shared with a GROUP share type share. Then return your new share provider in your share factory.

On my end (OCM app) I'll have to change the constructor for FedGroupShareManager and probably also the FedUserShareManager to get their providers from the share manager instead of directly instantiating them. And I'll also have to remove the assumption that I can know the relevant share manager from the share type in the OcmController.

With these changes, when the controller received the notification, will query the share from the manager which in return queries from the provider which are returned by your factory.

yasharpm commented 1 year ago

The changes on the OCM app are done in this commit.

navid-shokri commented 1 year ago

@yasharpm is this issue closed? or it is still open