Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow SpaceMembershipGroup #3620

Merged
merged 1 commit into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog/unreleased/space-group-member-sharetype.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Allow a new ShareType `SpaceMembershipGroup`

Added a new sharetype for groups that are members of spaces

https://github.com/cs3org/reva/pull/3620
7 changes: 5 additions & 2 deletions internal/http/services/owncloud/ocs/conversions/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ const (
// ShareTypeFederatedCloudShare represents a federated share
ShareTypeFederatedCloudShare ShareType = 6

// ShareTypeSpaceMembership represents an action regarding space members
ShareTypeSpaceMembership ShareType = 7
// ShareTypeSpaceMembershipUser represents an action regarding user type space members
ShareTypeSpaceMembershipUser ShareType = 7

// ShareTypeSpaceMembershipGroup represents an action regarding group type space members
ShareTypeSpaceMembershipGroup ShareType = 8

// ShareWithUserTypeUser represents a normal user
ShareWithUserTypeUser ShareWithUserType = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func (h *Handler) CreateShare(w http.ResponseWriter, r *http.Request) {
if role, val, err := h.extractPermissions(reqRole, reqPermissions, statRes.Info, conversions.NewViewerRole()); err == nil {
h.createFederatedCloudShare(w, r, statRes.Info, role, val)
}
case int(conversions.ShareTypeSpaceMembership):
case int(conversions.ShareTypeSpaceMembershipUser), int(conversions.ShareTypeSpaceMembershipGroup):
switch reqRole {
// Note: we convert viewer and editor roles to spaceviewer and spaceditor to keep backwards compatibility
// we can remove this switch when this behaviour is no longer wanted.
Expand Down