POST /api/system/apps/{app}/permissions
As of Version | product version 2020 Winter | component version 2020 Winter |
---|---|
Request Method | GET |
Response Format | XML/JSON |
Required Permission | available if listed in |
Description | This endpoint is used to update the global application permissions file of the yuuvis® system specified by the app URL parameter. Similar to other schema update endpoints in yuuvis®, this infers a schema validation and returns its result to the user, performing the update only after successful validation. |
Request Headers | Accept: [application/xml; application/json] |
Request Example | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <roleSet xmlns="http://optimal-systems.org/ns/dmscloud/roleset/"> <role> <name>ReadDeleteEmail</name> <permission> <action>read</action> <action>delete</action> <condition>system:objectTypeId = 'email:email'</condition> </permission> </role> <role> <name>ReadDocument</name> <permission> <action>read</action> <condition>system:objectTypeId = 'document'</condition> </permission> </role> <role> <name>ReadEmailAndDocument</name> <permission> <action>read</action> <condition>system:objectTypeId in ('email:email', 'document')</condition> </permission> </role> <role> <name>DeleteDocument</name> <permission> <action>delete</action> <condition>system:objectTypeId in ('document')</condition> </permission> </role> <role> <name>AdminRole</name> <permission> <action>read</action> <action>delete</action> </permission> </role> </roleSet> |
Response Example | The result is a JSON structure containing a 200 - no validation errors, the role set was updated { "validationErrors": [] } 422 - there were validation errors, the role set was not updated { "validationErrors": [ { "message": "Unable to unmarshal schema. [line: 14][column: 13] cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element 'condition' gefunden. '{\"http://optimal-systems.org/ns/dmscloud/roleset/\":action}' wird erwartet." } ] } |