Skip to content

Commit

Permalink
add arbitrary metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Oct 8, 2021
1 parent 7e7e3fc commit fde951f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/auth/scope/publicshare.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ func publicshareScope(ctx context.Context, scope *authpb.Scope, resource interfa
return checkStorageRef(ctx, &share, &provider.Reference{ResourceId: v.ResourceInfo.Id}, client, mgr), nil
case *gatewayv1beta1.OpenInAppRequest:
return checkStorageRef(ctx, &share, v.GetRef(), client, mgr), nil
case *provider.SetArbitraryMetadataRequest:
return checkStorageRef(ctx, &share, v.GetRef(), client, mgr), nil
case *provider.UnsetArbitraryMetadataRequest:
return checkStorageRef(ctx, &share, v.GetRef(), client, mgr), nil

case *userv1beta1.GetUserByClaimRequest:
return true, nil
Expand Down
4 changes: 4 additions & 0 deletions pkg/auth/scope/resourceinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func resourceinfoScope(_ context.Context, scope *authpb.Scope, resource interfac
return checkResourceInfo(&r, v.GetSource()) && checkResourceInfo(&r, v.GetDestination()), nil
case *provider.InitiateFileUploadRequest:
return checkResourceInfo(&r, v.GetRef()), nil
case *provider.SetArbitraryMetadataRequest:
return true, nil
case *provider.UnsetArbitraryMetadataRequest:
return true, nil

case string:
return checkResourcePath(v), nil
Expand Down

0 comments on commit fde951f

Please sign in to comment.