diff --git a/changelog/unreleased/graph-user-capabilities.md b/changelog/unreleased/graph-user-capabilities.md new file mode 100644 index 00000000000..def323a9c0c --- /dev/null +++ b/changelog/unreleased/graph-user-capabilities.md @@ -0,0 +1,5 @@ +Enhancement: Add Graph User capabilities + +Add capabilities to show if user can be created or deleted and if they can change their password on self service + +https://github.com/cs3org/reva/pull/3898 diff --git a/internal/http/services/owncloud/ocs/data/capabilities.go b/internal/http/services/owncloud/ocs/data/capabilities.go index 79bb05e8bbc..2613c2ceb03 100644 --- a/internal/http/services/owncloud/ocs/data/capabilities.go +++ b/internal/http/services/owncloud/ocs/data/capabilities.go @@ -80,8 +80,16 @@ 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"` - ReadOnlyUserAttributes []string `json:"read_only_user_attributes" xml:"read_only_user_attributes" mapstructure:"read_only_user_attributes"` + PersonalDataExport ocsBool `json:"personal-data-export" xml:"personal-data-export" mapstructure:"personal_data_export"` + User CapabilitiesGraphUser `json:"user" xml:"user" mapstructure:"user"` +} + +// CapabilitiesGraphUser holds the graph user capabilities +type CapabilitiesGraphUser struct { + ReadOnlyAttributes []string `json:"read_only_attributes" xml:"read_only_attributes" mapstructure:"read_only_attributes"` + CreateDisabled ocsBool `json:"create_disabled" xml:"create_disabled" mapstructure:"create_disabled"` + DeleteDisabled ocsBool `json:"delete_disabled" xml:"delete_disabled" mapstructure:"delete_disabled"` + ChangePasswordSelfDisabled ocsBool `json:"change_password_self_disabled" xml:"change_password_self_disabled" mapstructure:"change_password_self_disabled"` } // Status holds basic status information