Skip to content

Commit

Permalink
Add Spaces to Capabilities (#2015)
Browse files Browse the repository at this point in the history
  • Loading branch information
refs authored Sep 13, 2021
1 parent a1a5d61 commit b3b2be7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
Empty file added changelog/unreleased/.keep
Empty file.
5 changes: 5 additions & 0 deletions changelog/unreleased/spaces-capabilities.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Add spaces to the list of capabilities

In order for clients to be aware of the new spaces feature we need to enable the `spaces` flag on the capabilities' endpoint.

https://github.com/cs3org/reva/pull/2015
18 changes: 13 additions & 5 deletions internal/http/services/owncloud/ocs/data/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,22 @@ type CapabilitiesData struct {

// Capabilities groups several capability aspects
type Capabilities struct {
Core *CapabilitiesCore `json:"core" xml:"core"`
Checksums *CapabilitiesChecksums `json:"checksums" xml:"checksums"`
Files *CapabilitiesFiles `json:"files" xml:"files" mapstructure:"files"`
Dav *CapabilitiesDav `json:"dav" xml:"dav"`
FilesSharing *CapabilitiesFilesSharing `json:"files_sharing" xml:"files_sharing" mapstructure:"files_sharing"`
Core *CapabilitiesCore `json:"core" xml:"core"`
Checksums *CapabilitiesChecksums `json:"checksums" xml:"checksums"`
Files *CapabilitiesFiles `json:"files" xml:"files" mapstructure:"files"`
Dav *CapabilitiesDav `json:"dav" xml:"dav"`
FilesSharing *CapabilitiesFilesSharing `json:"files_sharing" xml:"files_sharing" mapstructure:"files_sharing"`
Spaces *Spaces `json:"spaces,omitempty" xml:"spaces,omitempty" mapstructure:"spaces"`

Notifications *CapabilitiesNotifications `json:"notifications,omitempty" xml:"notifications,omitempty"`
}

// Spaces lets a service configure its advertised options related to Storage Spaces.
type Spaces struct {
Version string `json:"version" xml:"version" mapstructure:"version"`
Enabled bool `json:"enabled" xml:"enabled" mapstructure:"enabled"`
}

// CapabilitiesCore holds webdav config
type CapabilitiesCore struct {
PollInterval int `json:"pollinterval" xml:"pollinterval" mapstructure:"poll_interval"`
Expand Down

0 comments on commit b3b2be7

Please sign in to comment.