Skip to content

Commit

Permalink
disallow to share the personal drive via graph
Browse files Browse the repository at this point in the history
  • Loading branch information
2403905 committed Feb 28, 2024
1 parent 23eafeb commit 0e7e1de
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-graph-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix graph drive invite

We fixed the issue when sharing of personal drive is allowed via graph

https://github.com/owncloud/ocis/pull/8538
https://github.com/owncloud/ocis/issues/8494
4 changes: 4 additions & 0 deletions services/graph/pkg/service/v0/driveitems.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ func (g Graph) Invite(w http.ResponseWriter, r *http.Request) {

condition := unifiedrole.UnifiedRoleConditionGrantee
if IsSpaceRoot(statResponse.GetInfo().GetId()) {
if statResponse.GetInfo().GetSpace().GetSpaceType() == _spaceTypePersonal {
errorcode.InvalidRequest.Render(w, r, http.StatusBadRequest, "space type is not eligible for sharing")
return
}
condition = unifiedrole.UnifiedRoleConditionOwner
}

Expand Down

0 comments on commit 0e7e1de

Please sign in to comment.