Skip to content

Commit

Permalink
Merge pull request #3731 from micbar/capabilites-link-pw
Browse files Browse the repository at this point in the history
add read_write_delete key
  • Loading branch information
micbar committed Mar 15, 2023
2 parents 53ed6a8 + ac7619c commit 44e55cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog/unreleased/public-link-password.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ Enhancement: Add config option to enforce passwords on public links

Added a new config option to enforce passwords on public links with "Uploader, Editor, Contributor" roles.

https://github.com/cs3org/reva/pull/3731
https://github.com/cs3org/reva/pull/3716
https://github.com/cs3org/reva/pull/3698
7 changes: 4 additions & 3 deletions internal/http/services/owncloud/ocs/data/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ type CapabilitiesFilesSharingPublicPassword struct {

// CapabilitiesFilesSharingPublicPasswordEnforcedFor TODO document
type CapabilitiesFilesSharingPublicPasswordEnforcedFor struct {
ReadOnly ocsBool `json:"read_only" xml:"read_only,omitempty" mapstructure:"read_only"`
ReadWrite ocsBool `json:"read_write" xml:"read_write,omitempty" mapstructure:"read_write"`
UploadOnly ocsBool `json:"upload_only" xml:"upload_only,omitempty" mapstructure:"upload_only"`
ReadOnly ocsBool `json:"read_only" xml:"read_only,omitempty" mapstructure:"read_only"`
ReadWrite ocsBool `json:"read_write" xml:"read_write,omitempty" mapstructure:"read_write"`
ReadWriteDelete ocsBool `json:"read_write_delete" xml:"read_write_delete,omitempty" mapstructure:"read_write_delete"`
UploadOnly ocsBool `json:"upload_only" xml:"upload_only,omitempty" mapstructure:"upload_only"`
}

// CapabilitiesFilesSharingPublicExpireDate TODO document
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ func (h *Handler) Init(c *config.Config) {

// h.c.Capabilities.FilesSharing.IsPublic.Password.EnforcedFor.ReadOnly is boolean
// h.c.Capabilities.FilesSharing.IsPublic.Password.EnforcedFor.ReadWrite is boolean
// h.c.Capabilities.FilesSharing.IsPublic.Password.EnforcedFor.ReadWriteDelete is boolean
// h.c.Capabilities.FilesSharing.IsPublic.Password.EnforcedFor.UploadOnly is boolean

// h.c.Capabilities.FilesSharing.IsPublic.Password.Enforced is boolean
Expand Down

0 comments on commit 44e55cb

Please sign in to comment.