Skip to content

Commit

Permalink
fix check permission on upload for single file share to lw account
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed May 2, 2023
1 parent fef69df commit 7ff531d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/grpc/interceptors/auth/scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@ func checkLightweightScope(ctx context.Context, req interface{}, tokenScope map[
InitiateFileUpload: true,
})
case *provider.InitiateFileUploadRequest:
if hasPermissions(ctx, client, r.GetRef(), &provider.ResourcePermissions{
InitiateFileUpload: true,
}) {
return true
}
parent, err := parentOfResource(ctx, client, r.GetRef())
if err != nil {
return false
Expand Down

0 comments on commit 7ff531d

Please sign in to comment.