Skip to content

Commit

Permalink
Add capabilities to indicate read-only attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Excds committed Apr 13, 2023
1 parent 23bdfcd commit 5646852
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Add capabilities indicating if user attributes are read-only

This adds capabilities that indicates if a user attribute is read-only, and
by this lets a frontend show this to the user.

https://github.com/cs3org/reva/pull/3789
15 changes: 14 additions & 1 deletion internal/http/services/owncloud/ocs/data/capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,20 @@ type CapabilitiesCore struct {

// CapabilitiesGraph holds the graph capabilities
type CapabilitiesGraph struct {
PersonalDataExport ocsBool `json:"personal-data-export" xml:"personal-data-export" mapstructure:"personal_data_export"`
PersonalDataExport ocsBool `json:"personal-data-export" xml:"personal-data-export" mapstructure:"personal_data_export"`
ReadOnlyAttribute *CababilitiesReadOnlyAttributes `json:"read_only_attributes" xml:"read_only_attributes" mapstructure:"read_only_attributes"`
}

// CababilitiesReadOnlyAttributes indicates which graph attributes are read only
type CababilitiesReadOnlyAttributes struct {
AccountEnabled ocsBool `json:"account_enabled" xml:"account_enabled" mapstructure:"account_enabled"`
DisplayName ocsBool `json:"display_name" xml:"display_name" mapstructure:"display_name"`
GivenName ocsBool `json:"given_name" xml:"given_name" mapstructure:"given_name"`
ID ocsBool `json:"id" xml:"id" mapstructure:"id"`
Mail ocsBool `json:"mail" xml:"mail" mapstructure:"mail"`
OnPremisesSamAccountName ocsBool `json:"on_premises_sam_account_name" xml:"on_premises_sam_account_name" mapstructure:"on_premises_sam_account_name"`
Surname ocsBool `json:"surname" xml:"surname" mapstructure:"surname"`
Quota ocsBool `json:"quota" xml:"quota" mapstructure:"quota"`
}

// Status holds basic status information
Expand Down

0 comments on commit 5646852

Please sign in to comment.